05.01.2016, 09:02
Код:
CMD:mapp(playerid, params[]) { new Float:TY, Float:TX, Float:TZ, targetname[MAX_PLAYER_NAME], IDofName, string[128], realname[MAX_PLAYER_NAME]; if(sscanf(params,"u",targetname)) return SendClientMessage(playerid,-1, "{FF0000}Usage: /mapp [player name]!"); IDofName = GetPlayerID(targetname, 1); { new shit[128]; format(shit, sizeof(shit), "Returned ID: %d", IDofName); SendClientMessage(playerid, -1, shit); if(!IsPlayerConnected(IDofName)) { SendClientMessage(playerid, 0xFF0000FF, "Error: player is not connected."); } else { GetPlayerPos(IDofName, TX, TY, TZ); GPSMarkeris[playerid] = SetPlayerMapIcon(playerid, 0, TX, TY, TZ, 0, 0xFF0000FF, 1); GetPlayerName(IDofName, realname, sizeof(realname)); format(string, sizeof(string), "{3399FF}[GPS] {5167F0}%s {3399FF}last known location has been marked {FF0000}with a red marker", realname); SendClientMessage(playerid, COLOR_HIGHLIGHT, string); } } return 1; }
This stuff is to see what value is returned:
Код:
new shit[128]; format(shit, sizeof(shit), "Returned ID: %d", IDofName); SendClientMessage(playerid, -1, shit);