SA-MP Forums Archive
Dynamic Door Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dynamic Door Problem (/showthread.php?tid=630439)



Dynamic Door Problem - Serialflood - 14.03.2017

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!


Re: Dynamic Door Problem - SyS - 14.03.2017

wait lemme use my magic wand.


Re: Dynamic Door Problem - Serialflood - 14.03.2017

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
wait lemme use my magic wand.
I'm sorry if it leak of information what would you need to check?


Re: Dynamic Door Problem - Toroi - 14.03.2017

Quote:
Originally Posted by Serialflood
Посмотреть сообщение
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?

Код:
PlayerUseingBase[playerid] = GetClosestBase(playerid);