How would I - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How would I (
/showthread.php?tid=66854)
How would I -
Snyper18 - 24.02.2009
I was wondering, How would i make a function that Would kick all players if a Admin does /kickall, And hes rank ... 6 admin for example?
Thanks alot!
Re: How would I -
[RP]Rav - 24.02.2009
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext,"/kickall",true) == 0)
{
if (player admin level < 6)
return 1;
for (new i = 0; i < MAX_PLAYERS; i++)
kick(i);
return 1;
}
return 1;
}
something like that
Re: How would I -
Jefff - 24.02.2009
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext,"/kickall",true) == 0)
{
for (new i = 0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i) && player_admin_level < 6) Kick(i);
return 1;
}
return 0;
}