[Help] Somethings wrong with my Admin commands? - 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: [Help] Somethings wrong with my Admin commands? (
/showthread.php?tid=119989)
[Help] Somethings wrong with my Admin commands? -
Niixie - 10.01.2010
Hello SAMP members.
I've made this Admin filterscript, login etc works. but reading from the dudb file doesnt work?
heres one of the codes that doesnt work
pawn Код:
dcmd_ah(playerid, params[])
{
#pragma unused params
if(PlayerInfo[playerid][LoggedIn] == 0) return SendClientMessage(playerid, COLOR_RED, "[NiixieDM]: You need to be logged in to use that command!");
if(PlayerInfo[playerid][AdminLevel] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "");
SendClientMessage(playerid, COLOR_YELLOW, "");
SendClientMessage(playerid, COLOR_YELLOW, "******** NiixieDM - Admin Help ********");
SendClientMessage(playerid, COLOR_YELLOW, "");
SendClientMessage(playerid, COLOR_YELLOW, "/Kick - Kicks a player (Level: 1)");
SendClientMessage(playerid, COLOR_YELLOW, "/Ban - Bans a player (Level: 2)");
SendClientMessage(playerid, COLOR_YELLOW, "/Slap - Slaps a player (Level: 1)");
SendClientMessage(playerid, COLOR_YELLOW, "/Sethealth - Sets a players health (Level: 1)");
SendClientMessage(playerid, COLOR_YELLOW, "");
SendClientMessage(playerid, COLOR_PINK, "/ah2 - Shows you more admin commands");
}
return SendClientMessage(playerid, COLOR_RED, "[NiixieDM]: You are not authorized to use that command!");
}
Im admin level 3 and still doesnt have permission?
Whats wrong?
Re: [Help] Somethings wrong with my Admin commands? -
[HiC]TheKiller - 10.01.2010
pawn Код:
// if(dUserINT(PlayerName(playerid)).("Admin") <= 1)
Less < More
So pretty much, that statement says "If you are admin level 1 or less it will continue".
Re: [Help] Somethings wrong with my Admin commands? -
Niixie - 10.01.2010
If you look good at it with your sharp eyes you can see that its commented.. i were testing something with that '<''>' sign
Re: [Help] Somethings wrong with my Admin commands? -
Niixie - 11.01.2010
Anyone?
I'd like help
Re: [Help] Somethings wrong with my Admin commands? -
[gmR]BarMaN - 11.01.2010
if(PlayerInfo[playerid][AdminLevel] == 1)
change this to
if(PlayerInfo[playerid][AdminLevel] >= 1)
Re: [Help] Somethings wrong with my Admin commands? -
Niixie - 11.01.2010
Arh, i used that in another script. why didnt i think of that?
-Thanks
EDIT: Can you tell me how i save the register file in a folder theres inside scriptfiles?