01.05.2017, 16:02
Guzs I want Some Admins Command Like Kick Ban Make Admin Freeze Unfreeze
WithOut any inc Its Possible
WithOut any inc Its Possible
#include <a_samp>
#include <zcmd>
#include <sscanf2>
enum info {
adminlevel
};
new pinfo[MAX_PLAYERS][info];
CMD:kick(playerid, params[])
{
new id;
if (sscanf(params, "u", id)) return SendClientMessage(playerid,-1, "usage: /kick <id>");
if( pinfo[playerid][adminlevel] += 1 )
{
Kick(id);
}
else return SendClientMessage (playerid, -1, "you dont have permission!");
}
if( pinfo[playerid][adminlevel] += 1 )
if( pinfo[playerid][adminlevel] >= 1 )
CMD:kick(playerid, params[])
{
new id;
if (sscanf(params, "u", id)) return SendClientMessage(playerid,-1, "usage: /kick <id>");
if( pinfo[playerid][adminlevel] >= 1 )
{
Kick(id);
}
else
{
SendClientMessage (playerid, -1, "you dont have permission!");
}
return 1;
}
Guzs I want Some Admins Command Like Kick Ban Make Admin Freeze Unfreeze
WithOut any inc Its Possible |
CMD:freeze(playerid,params)
{
new id;
if(sscanf(params,"u",id))
{
SendClientMessage(playerid,0xFF0000FF,"USAGE: /freeze [playerid");
return 1;
}
if(IsPlayerConnected(id) && id != playerid)
{
TogglePlayerControllable(id, 0);
}
return 1;
}
CMD:unfreeze(playerid,params)
{
new id;
if(sscanf(params,"u",id))
{
SendClientMessage(playerid,0xFF0000FF,"USAGE: /unfreeze [playerid");
return 1;
}
if(IsPlayerConnected(id) && id != playerid)
{
TogglePlayerControllable(id, 1);
}
return 1;
}
PHP код:
PHP код:
PHP код:
|
C:\Users\Ali Computer\Desktop\0.3.7\filterscripts\Adminsmy.pwn( 59) : warning 209: function "cmd_kick" should return a value Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase |
CMD:kick(playerid, params[])
{
new id;
if (sscanf(params, "u", id)) return SendClientMessage(playerid,-1, "usage: /kick <id>");
if( pinfo[playerid][adminlevel] += 1 )
{
Kick(id);
}
else return SendClientMessage (playerid, -1, "you dont have permission!");
return 1;
}
Just add a return 1; to the end of the function, just like shown below.
PHP код:
|
PHP код:
PHP код:
PHP код:
|