30.09.2013, 22:45
How do i Change one of these Commands
Into like a CMD
Command) type of Command?
Код:
if(strcmp(cmd, "/finishreport", true) == 0 || strcmp(cmd, "/frp", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 2) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /(f)inish®e(p)ort[PlayerID/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(AcceptedReport[playerid] != giveplayerid) { return SendClientMessage(playerid, -1," You haven't accepted this player's report !"); } GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "AdmCmd: %s has Finished %s's report", sendername, giveplayer); ABroadCast(COLOR_RED, string, 1); format(string, sizeof(string), "%s has Finished your report, you can now continue your gameplay.", sendername); SendClientMessage(giveplayerid, COLOR_WHITE, string); AcceptedReport[playerid] = -1; Talkingto[playerid] = -1; } } } else { SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use that command !"); return 1; } } return 1; }
![Sad](images/smilies/sad.gif)