02.03.2009, 09:01
I guess it is, but when I add this script under my /check CMD, its crashes the server when I trying to type /check.
Any Ideas?
Код:
if (strcmp(cmd, "/check", true) == 0) { new cmdstring[64]; if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] >= 1) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USAGE:] /check [playerid]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { ShowStats(playerid,giveplayerid); format (cmdstring, sizeof(cmdstring), "/check2 %d", giveplayerid); CallRemoteFunction("OnPlayerCommandText", "is", playerid, cmdstring); } } else { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] Invalid ID."); } } else { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] Your not an administrator."); } } return 1; }