Command error -
Dejan12345 - 03.08.2016
Код:
CMD:ban(playerid, params[])
{
new id, reason[50], string[128], banned[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdminLevel] < 2 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,red,"You Are not Rcon admin Or admin lvl 3+");
if(sscanf(params, "uz", id, reason)) return SendClientMessage(playerid, -1, "USAGE: /ban [playerid] [reason(optional)]");
GetPlayerName(id, banned, sizeof(banned));
format(string, sizeof(string), "AdmCmd: %s has been banned by %s. reason: %s", banned, GetName(playerid), reason);
SendClientMessageToAll(red, string);
BanEx(id, reason);
return 1;
}
help
errors
Код:
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(442) : error 017: undefined symbol "PlayerInfo"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(442) : warning 215: expression has no effect
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(442) : error 001: expected token: ";", but found "]"
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(442) : error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\Dejanovi folderi\Black Angeles Roleplay\gamemodes\BARP.pwn(442) : fatal error 107: too many error messages on one line
Re: Command error -
Luicy. - 03.08.2016
Well, either don't you have a Player variable to store the information, or you entered the wrong variable name, do you have some /stats or something to look up the variable?
Re: Command error -
Dejan12345 - 03.08.2016
no only pay kick giveall and this error ban command
Re: Command error -
SyS - 03.08.2016
Quote:
Originally Posted by Dejan12345
no only pay kick giveall and this error ban command
|
show the decalaration
Re: Command error -
Luicy. - 03.08.2016
Show me /giveall if it's for admins only, that way, I assume you're checking there.
Re: Command error -
Dejan12345 - 03.08.2016
here all function
Код:
CMD:ban(playerid, params[])
{
new id, reason[50], string[128], banned[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdminLevel] < 2 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,red,"You Are not Rcon admin Or admin lvl 3+");
if(sscanf(params, "uz", id, reason)) return SendClientMessage(playerid, -1, "USAGE: /ban [playerid] [reason(optional)]");
GetPlayerName(id, banned, sizeof(banned));
format(string, sizeof(string), "AdmCmd: %s has been banned by %s. reason: %s", banned, GetName(playerid), reason);
SendClientMessageToAll(red, string);
BanEx(id, reason);
return 1;
}
Re: Command error -
Luicy. - 03.08.2016
You just reposted the /ban command, show us the /giveall.
Re: Command error -
Dejan12345 - 03.08.2016
Код:
CMD:giveall(playerid, params[])
{
new value;
if(!IsPlayerAdmin(playerid)) return 1;
if(sscanf(params, "d", value) != 0) SendClientMessage(playerid, 0xFF0000AA, "Koristi: /giveall [Koliko Para]");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GivePlayerMoney(i, value);
}
}
return 1;
}
here
Re: Command error -
Luicy. - 03.08.2016
Since you're using rcon;
PHP код:
CMD:ban(playerid, params[])
{
new id, reason[50], string[128], banned[MAX_PLAYER_NAME];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,red,"You Are not Rcon admin Or admin lvl 3+");
if(sscanf(params, "uz", id, reason)) return SendClientMessage(playerid, -1, "USAGE: /ban [playerid] [reason(optional)]");
GetPlayerName(id, banned, sizeof(banned));
format(string, sizeof(string), "AdmCmd: %s has been banned by %s. reason: %s", banned, GetName(playerid), reason);
SendClientMessageToAll(red, string);
BanEx(id, reason);
return 1;
}
Re: Command error -
K0P - 03.08.2016
lol
Код:
if(!IsPlayerAdmin(playerid)) return 1;
Change it to
Код:
if(!IsPlayerAdmin(playerid)) return 0;
In the giveall command