SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/03/2017, 01:28 PM   #1
Serialflood
Little Clucker
 
Join Date: Jun 2009
Posts: 22
Reputation: 2
Default Dynamic Door Problem

Hello there, I'm having a problem with this command not working in game:

Quote:
CMDpen(playerid,params[])
{
new Float,Float:y,Float:z,passw;
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
for(new i=1;i<MAX_BASES;i++)
{
GetDynamicObjectPos(i,x,y,z);
PlayerUseingBase[playerid] = GetClosestBase(playerid);
if(IsPlayerInRangeOfPoint(playerid,2.0,x,y,z))
{
SetDynamicObjectRot(i,0,0,90);
PlayerUseingBase[playerid] = -1;
if(BaseInfo[PlayerUseingBase[playerid]][bModel] != ModelDoor) return SendClientMessage(playerid,-1,"This is not a door");
if(BaseInfo[PlayerUseingBase[playerid]][bPass] == 0) return SendClientMessage(playerid,-1,"This door doesn't have password");
if(sscanf(params, "i",passw)) return SendClientMessage(playerid, COLOR_GREY, "USAGE:{FFFFFF} /open [password]");
if(passw !=BaseInfo[PlayerUseingBase[playerid]][bPass]) return SendClientMessage(playerid,-1,"Wrong Password");

}
}
}
return 1;
}
It doesn't give me any error or warning it just doesn't work. Any help would be great!
Serialflood is offline   Reply With Quote
Old 14/03/2017, 01:41 PM   #2
SyS
High-roller
 
SyS's Avatar
 
Join Date: Oct 2015
Posts: 1,939
Reputation: 504
Default Re: Dynamic Door Problem

wait lemme use my magic wand.
SyS is offline   Reply With Quote
Old 14/03/2017, 01:44 PM   #3
Serialflood
Little Clucker
 
Join Date: Jun 2009
Posts: 22
Reputation: 2
Default Re: Dynamic Door Problem

Quote:
Originally Posted by Sreyas View Post
wait lemme use my magic wand.
I'm sorry if it leak of information what would you need to check?
Serialflood is offline   Reply With Quote
Old 14/03/2017, 01:54 PM   #4
Toroi
Gangsta
 
Toroi's Avatar
 
Join Date: Feb 2017
Location: Venezuela
Posts: 693
Reputation: 146
Default Re: Dynamic Door Problem

Quote:
Originally Posted by Serialflood View Post
I'm sorry if it leak of information what would you need to check?
The fucking Snowden.

---

What does the following code is supposed to do?

Code:
PlayerUseingBase[playerid] = GetClosestBase(playerid);
Toroi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic door problem IndependentGaming Scripting Help 4 06/05/2015 09:30 PM
[Help] Dynamic Door Kaylen Scripting Help 5 20/09/2014 06:56 PM
Dynamic Door ChuckyBabe Scripting Help 7 07/03/2014 11:10 PM
Dynamic Door help. Will REP++++ Alex_T Scripting Help 3 27/10/2013 11:28 PM


All times are GMT. The time now is 09:23 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.