[HELP] Admin Protection - 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] Admin Protection (
/showthread.php?tid=237909)
Re: [HELP] Admin Protection -
xir - 10.03.2011
Try this
http://pastebin.com/GmGgs559
Re: [HELP] Admin Protection -
kemppis_ - 10.03.2011
Still no dialog
Re: [HELP] Admin Protection -
kemppis_ - 10.03.2011
You can try it your self, -> 84.251.155.185:7777
Mod is now lvdm
Respuesta: [HELP] Admin Protection -
Alex_Obando - 10.03.2011
Look Dude, Just make this
Код:
if (strcmp(cmdtext, "/veh", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Vehicles","1.Elegy\n2.Hotring Racer\n3.Super GT\n4.Bullet\n5.Police LSPD\n6.Firetruck LA","Spawn","Exit");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You are not an admin");
return 1;
}
}
Re: [HELP] Admin Protection -
Snipa - 11.03.2011
pawn Код:
if (strcmp("/veh", cmdtext, true, 5) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF030DAA,"You are not an admin!");
else {
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Vehicles","1.Elegy\n2.Hotring Racer\n3.Super GT\n4.Bullet\n5.Police LSPD\n6.Firetruck LA","Spawn","Exit");
}
return 1;
}
I highly recommend zcmd.
That would turn into:
pawn Код:
command(veh,playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF030DAA,"You are not an admin!");
else {
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Vehicles","1.Elegy\n2.Hotring Racer\n3.Super GT\n4.Bullet\n5.Police LSPD\n6.Firetruck LA","Spawn","Exit");
}
return 1;
}
Plus, it is MUCH faster than strcmp.
Re: [HELP] Admin Protection -
Roomeo - 11.03.2011
He is Doing soemthing wrong i guess
Re: [HELP] Admin Protection -
kemppis_ - 11.03.2011
Xir said than !isPlayerAdmin is only for Rcon admin, i wanna make it for Admin grouop
Like it kinda reads user%.ini and if adminlevel is < 0 it let's you to use vehicle menu
That kinda thing, if possible :S
Re: [HELP] Admin Protection -
kemppis_ - 11.03.2011
IT WORKS!!, Still need help
It works only on Gamemode, not filescript..
so, i tried
gamemode0 ls-cnr 1
gamemode1 admin 1 <-my gamemode
but not working ://
doesnt load gamemode1