How to script ban and kick command?
#2

Код:
dcmd_kick(playerid,params[]){
new id;
if(IsPlayerAdmin3(playerid)) return SendClientMessage(playerid,-1,"You are not admin");
if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"Use: /kick <id>");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Wrong player id");
if(id == playerid) return SendClientMessage(playerid,-1,"You can't kick yourself");
Kick(id);
SendClientMessage(playerid,-1,"Player kicked");
return 1;
}
And use sscanf
Reply


Messages In This Thread
How to script ban and kick command? - by Hitman-97- - 18.05.2011, 07:19
Re: How to script ban and kick command? - by BloodMaster - 18.05.2011, 08:03
Re: How to script ban and kick command? - by Hitman-97- - 18.05.2011, 10:06
Re: How to script ban and kick command? - by DeadAhead - 18.05.2011, 10:40
Re: How to script ban and kick command? - by Hitman-97- - 19.05.2011, 07:15
Re: How to script ban and kick command? - by xalith - 19.05.2011, 07:49

Forum Jump:


Users browsing this thread: 1 Guest(s)