13.03.2015, 20:50
Hi there, I want to remove the players driving license and I made a command..
The problem is that remove the license of "PlayerB" (being I Admin) placed in chat "Admin loses her driving license"
The effect of the command is true, but the name of who loses his driver's license is always wrong. What is the error?
I need help please, regards
Код:
dcmd_nodriving( playerid, params[]) { { new pid; new str[68], pName[MAX_PLAYER_NAME],Float:x, Float:y, Float:z; GetPlayerName(pid, playername, sizeof(playername)); if(sscanf(params, "u", pid)) return SendClientMessage(playerid, -1, "Usage: /nodriving (player id)"); if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, Color_Red, "Player must be connected."); RemovePlayerFromVehicle(pid); format(str, sizeof(str), "%s loses her driving license", playername); SendClientMessageToAll(Color_Red, str); GetPlayerPos(pid, x, y, z); SetPlayerPos(pid, x, y, z); nocar[pid] = true; } return true; }
The effect of the command is true, but the name of who loses his driver's license is always wrong. What is the error?
I need help please, regards