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; } |
I'm sorry if it leak of information what would you need to check?
|
PlayerUseingBase[playerid] = GetClosestBase(playerid);