07.01.2010, 20:08
Quote:
Originally Posted by _Xerxes_
Show the whole /setstat command.
|
Quote:
if(strcmp(cmd, "/setstat", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /setstat [playerid/PartOfName] [statcode] [amount]"); *** *** *** *** SendClientMessage(playerid, COLOR_GRAD2, "|20 Color "); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /setstat [playerid/PartOfName] [statcode] [amount]"); *** *** *** *** SendClientMessage(playerid, COLOR_GRAD2, "|20 Color "); return 1; } new stat; stat = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /setstat [playerid/PartOfName] [statcode] [amount]"); *** *** *** *** SendClientMessage(playerid, COLOR_GRAD2, "|20 Color "); return 1; } new amount; amount = strval(tmp); if (PlayerInfo[playerid][pAdmin] >= 4) { switch (stat) { *** case 20: { PlayerInfo[giveplayerid][pColor] = amount; format(string, sizeof(string), " The Player Color Was Set To %d", amount); } *** default: { format(string, sizeof(string), " Invalid Stat Code", amount); } } SendClientMessage(playerid, COLOR_GRAD1, string); } else { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!"); } }//not valid id }//not connected } return 1; } |