weird problem with commands -
Glossy42O - 23.07.2015
Okay, so if i don't /login it will tell me "You can't use commands before u login bla bla blah"
after i login and spawn if i do /jail, /slap no matter what level i am it says i don't have the privilege to use this command..
I don't know which code do i need to show since it's with all my commands.. do i need 1 command to show for example?
Re: weird problem with commands -
BleverCastard - 23.07.2015
I take it you're setting an enum when they login? If so, make sure it's being set by debugging.
Re: weird problem with commands -
Glossy42O - 23.07.2015
What do you mean? i only have Logged, and AdminLevel,
Re: weird problem with commands -
Glossy42O - 23.07.2015
sorry for bumping but i have to go tomorrow for a trip.. can anyone help?
Re: weird problem with commands -
MBilal - 23.07.2015
Quote:
Originally Posted by Glossy42O
Okay, so if i don't /login it will tell me "You can't use commands before u login bla bla blah"
after i login and spawn if i do /jail, /slap no matter what level i am it says i don't have the privilege to use this command..
I don't know which code do i need to show since it's with all my commands.. do i need 1 command to show for example?
|
I think you are not saving the Admin level correctly.
Re: weird problem with commands -
Andre02 - 23.07.2015
Can you show us one of your Commands(That you need a certain level to use it) Code
Re: weird problem with commands -
Glossy42O - 23.07.2015
PHP код:
CMD:freeze(playerid, params[])
{
if(pInfo[playerid][AdminLevel] >= 1) return SendClientMessage(playerid, -1, "{FF0000}[SYSTEM ERROR]: You don't have the privilege to use that command.");
{
new id, name[128], string[128];
if(pInfo[playerid][Logged] == 0) return SendClientMessage(playerid, -1, "{FF0000}[SYSTEM[: {FFFFFF}You have to login before you can use commands !");
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "{FF0000}[SYSTEM ERROR]: {FFFFFF}USAGE: /freeze [id]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "{FF0000}[SYSTEM ERROR]: The ID you have inputted is incorrect !");
PlayerPlaySound(playerid,6400,0.0,0.0,0.0);
TogglePlayerControllable(id, 0);
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
format(string,sizeof string,"You have freezed %s",name);
SendClientMessageToAll(-1, string);
format(string,sizeof string, "{FF0000}[SYSTEM]: You have been frozen by {FFFF00}%s",name);
}
return 1;
}
Re: weird problem with commands -
xVIP3Rx - 23.07.2015
You should be logged and an admin, show us the code where you login and make yourself an admin
Re: weird problem with commands -
Crystallize - 23.07.2015
show us onplayerspawn and onplayerdisconnect
Re: weird problem with commands -
Glossy42O - 23.07.2015
Quote:
Originally Posted by xVIP3Rx
You should be logged and an admin, show us the code where you login and make yourself an admin
|
man do u even read what i said? "no matter what level i am it says i don't have the privilege to use this command.."
Quote:
Originally Posted by Wizzard2H
show us onplayerspawn and onplayerdisconnect
|
PHP код:
public OnPlayerDisconnect(playerid,reason)
{
pInfo[playerid][Logged] = 0;
return 1;
}
and i don't have on spawn