16.01.2010, 23:13
OK in my server say I do /akill Ryan Bugged.
It will come up **Admin Kill**Ryan(0)ugged.
If I do /akill Ryan Bugged. ((Notice the 2 spaces))
It will come up **Admin Kill**Ryan(0)Bugged.
Any ideas on how to resolve it so I only have to do one space?
Edit: This happens with all admin commands involving reason.
It will come up **Admin Kill**Ryan(0)ugged.
If I do /akill Ryan Bugged. ((Notice the 2 spaces))
It will come up **Admin Kill**Ryan(0)Bugged.
Any ideas on how to resolve it so I only have to do one space?
Код:
if(strcmp(cmd, "/akill", true) == 0 && PlayerAdminLevel[playerid] == 1337) // Admin Kill A Player { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_ERROR, "USAGE: /akill (id)"); return 1; } giveplayerid = strval(tmp); if(!IsNumeric(tmp)) { SendClientMessage(playerid, COLOR_ERROR, "USAGE: /akill (id) ID Must be a number"); return 1; } new output[255]; AdminKilled[giveplayerid] =1; strmid(output,cmdtext,10,strlen(cmdtext)); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, string, 24); format(string, 100, "**(ADMIN KILL)** %s(%d) %s", string,giveplayerid,output); printf("%s", string); SendClientMessageToAll(0xFF7F50AA, string); SetPlayerHealth(giveplayerid,0); } else { format(string, sizeof(string), "ID (%d) Is not an active player", giveplayerid); SendClientMessage(playerid, COLOR_ERROR, string); } return 1; }