Dynamic Door Problem
#1

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!
Reply


Messages In This Thread
Dynamic Door Problem - by Serialflood - 14.03.2017, 13:28
Re: Dynamic Door Problem - by SyS - 14.03.2017, 13:41
Re: Dynamic Door Problem - by Serialflood - 14.03.2017, 13:44
Re: Dynamic Door Problem - by Toroi - 14.03.2017, 13:54

Forum Jump:


Users browsing this thread: 2 Guest(s)