07.12.2008, 14:14
Код:
if(strcmp("/health", cmd, true) == 0) { new tmp[256]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_MAIN, "Type /health <ID>"); if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, COLOR_MAIN, "Enter a valid player ID!"); new player = strval(tmp); new pname[MAX_PLAYER_NAME]; GetPlayerName(player, pname, sizeof(pname)); new string[256]; format(string, sizeof(string), "%s's health amount is %d!", pname, GetPlayerHealth(playerid)); SendClientMessage(playerid, COLOR_GREEN, string); return 1; }