14.03.2017, 13:28
Hello there, I'm having a problem with this command not working in game:
It doesn't give me any error or warning it just doesn't work. Any help would be great!
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; } |