26.08.2011, 17:20
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].");
}
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