Quote:
Originally Posted by Jochemd
pawn Код:
dcmd_kicknonrp(playerid,params[]) { new target; if(!sscanf(params,"u",target)) { if(IsPlayerConnected(target)) { new Playername[MAX_PLAYER_NAME],str[70]; GetPlayerName(target,Playername,sizeof(Playername)); format(str,sizeof(str),"* %s was kicked, come back with a roleplay name.",Playername); SendClientMessageToAll(-1,str); Kick(target); } else return SendClientMessage(playerid,-1,"Invalid player."); } else return SendClientMessage(playerid,-1,"Error: /kicknonrp [ID]."); }
You may need the DCMD define. I used DCMD here cause it's faster than strcmp and easier to use (but I suggest you ZCMD)
pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
Jochem
|
k with a roleplay name. . I want it to say, come back with a roleplaying name such as %s