02.08.2013, 13:43
here dude try it
Код:
if(strcmp("/getinfo", cmd, true) == 0) { new tmp[256], cmdid; tmp = strtok(cmdtext, idx); if(GetPlayerLevel(playerid) < 1) return SendClientMessage(playerid, red, "You are not permitted to use this"); if(!strlen(tmp)) return SendClientMessage(playerid, red, "You did not put in an id"); if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, red, "That player is not connected"); cmdid = strval(tmp); new oname[MAX_PLAYER_NAME]; GetPlayerName(cmdid, oname, sizeof(oname)); new string[256]; SendClientMessage(playerid, green, "===INFO==="); format(string, sizeof(string), "Name: %s", oname); SendClientMessage(playerid, green, string); format(string, sizeof(string), "ID: %d", cmdid); SendClientMessage(playerid, green, string); format(string, sizeof(string), "Cash: %d", GetPlayerMoney(cmdid)); SendClientMessage(playerid, green, string); format(string, sizeof(string), "Score: %d", GetPlayerScore(cmdid)); SendClientMessage(playerid, green, string); format(string, sizeof(string), "Kills: %d", dUserINT(PlayerName(playerid)).("kills")); SendClientMessage(playerid, green, string); format(string, sizeof(string), "Deaths: %d", dUserINT(PlayerName(playerid)).("deaths")); SendClientMessage(playerid, green, string); } } return 1; }