new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/kick", true) == 0)
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USE: /kick [ID DO PLAYER]");
Kick(strval(tmp));
return 1;
}
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/kick", true) == 0)
{
if(!IsPlayerAdmin(playerid))
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USE: /kick [ID DO PLAYER]");
Kick(strval(tmp));
return 1;
}
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/kick", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] <= 1342)
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USE: /kick [ID DO PLAYER]");
Kick(strval(tmp));
return 1;
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, " Vocк nгo й Admin!");
}
}
}
Como euu deixo esse comando soomente para Admin 1342, 1341 ?
PHP код:
|
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/kick", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 1341) return SendClientMessage(playerid, -1, "Vocк nгo й administrador 1341 ou mais!");
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USE: /kick [ID DO PLAYER]");
Kick(strval(tmp));
return 1;
}
pawn Код:
|
Imagino que seja GF, entгo use:
pawn Код:
WTF cara? Isso simplesmente tб errado, alйm de checar se o cara NГO estб na RCON, nгo й variбvel de administraзгo do servidor dele. |
C:\Users\matheus\Desktop\Teste.pwn(69) : error 017: undefined symbol "pInfo"
C:\Users\matheus\Desktop\Teste.pwn(69) : error 009: invalid array size (negative, zero or out of bounds
new PlayerInfo[MAX_PLAYERS][pInfo];
enum pInfo
{
Admin,
Banido,
Level,
Grana
};