14.03.2016, 11:26
i am looking to make a /loc system
when a player types /loc [id] it shows the player loc and car but it shows me some errors while doing with ssanf
here is the code
when a player types /loc [id] it shows the player loc and car but it shows me some errors while doing with ssanf
here is the code
Код:
CMD:loc(playerid, params[]) { new id; new target, current_zone; current_zone = player_zone[target]; if(sscanf(params, "u", id)) { SendClientMessage(playerid, 0xFF0000FF, "Usage: /loc [playerid]"); } else { if(current_zone != -1 && IsPlayerConnected(target)) { new playername[MAX_PLAYER_NAME],message2[170]; GetPlayerName(id,playername,MAX_PLAYER_NAME); format(message2,sizeof(message2),"%s(%d)'s current location: %s",playername,target,zones[current_zone][zone_name]); SendClientMessage(playerid,0x00C7FFAA,message2); } else { SendClientMessage(playerid,red,"Invalid Player ID"); } } }