SA-MP Forums Archive
Admin only zone doesnt work for admins. - 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: Admin only zone doesnt work for admins. (/showthread.php?tid=237728)

Pages: 1 2


Admin only zone doesnt work for admins. - Gemini - 10.03.2011

I am using LAdmin 2.2 by Lethal. Everything works good.
But now when I want to create an admin-only zone, which should be enterable for admins only, it doesn't work properly. Whenever i am logged in into the rcon I can enter the zone, but when im logged in as ladmin I cant enter the zone, so it doesnt see me as an admin status. Heres the script, http://pastebin.com/4KZHgZG3

Can anyone help me how to make this zone enterable for admins, with the ladmin script?
scriptfiles\ladmin\users. The highest lvl for admins is 5, but I would like to make it enterable for all levels (1-5)

Thanks.


Re: Admin only zone doesnt work for admins. - mprofitt - 10.03.2011

pawn Code:
if(IsPlayerInArea(i,2082.2393,2417.5349,1203.1693,1363.7429) && !IsPlayerAdmin(i))
IsPlayerAdmin, change that to the what ever variable designates admin in your script.


Re: Admin only zone doesnt work for admins. - Gemini - 10.03.2011

and how do I know what variable that is?


Re: Admin only zone doesnt work for admins. - Gemini - 10.03.2011

so now I did this:
if(IsPlayerInArea(i,2082.2393,2417.5349,1203.1693, 1363.7429) && !IsPlayerLAdmin(i))

and it gives me error message; 'undefined symbol "IsPlayerLAdmin"


Re: Admin only zone doesnt work for admins. - Gemini - 10.03.2011

I used #define IsPlayerLAdmin on top of the script, and it compiled.
But it still doesnt work, when im logged in and im lvl 5 ladmin (but not logged in into the rcon) i still die when I enter the zone. Help please.


Re: Admin only zone doesnt work for admins. - mprofitt - 10.03.2011

Is there a player admin level variable? if so, use this...

if(IsPlayerInArea(i,2082.2393,2417.5349,1203.1693, 1363.7429) && AdminLevelVariable[i] > 0)


Re: Admin only zone doesnt work for admins. - AK47317 - 10.03.2011

lol? u need to use like
pawn Code:
if(PlayerInfo[playerid][AdminLevel] >= 1)



Re: Admin only zone doesnt work for admins. - Gemini - 10.03.2011

I dont understand anything of the admin variable, heres the admin script im using; http://pastebin.com/kk5AhxbM
and here, is the zone script with the added IsPlayerLAdmin; http://pastebin.com/QQrMfZvq


Re: Admin only zone doesnt work for admins. - AK47317 - 10.03.2011

yess perfect

add this
pawn Code:
if(PlayerInfo[playerid][Level] >= 1)
under the area..


Re: Admin only zone doesnt work for admins. - AK47317 - 10.03.2011

crap... i meant upper it like
pawn Код:
if(PlayerInfo[playerid][Level] >= 1) { sPlayerInArea(i,2082.2393,2417.5349,1203.1693, 1363.7429) }



Re: Admin only zone doesnt work for admins. - Gemini - 10.03.2011

Could you perhaps download my pastebin script and add that line in there? I cant seem to make it work myself


Re: Admin only zone doesnt work for admins. - AK47317 - 10.03.2011

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(PlayerInfo[playerid][Level] >= 1)
    {
        PlayerInArea(i,2082.2393,2417.5349,1203.1693, 1363.7429);
    }
    else
    {
        if(IsPlayerInArea(2082.2393,2417.5349,1203.1693, 1363.7429);
        {
            SetHealth(i, 0.0);
        }
    }
}



Re: Admin only zone doesnt work for admins. - Gemini - 10.03.2011

error 017: undefined symbol "PlayerInfo"
error 017: undefined symbol "playerid"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

4 errors


Re: Admin only zone doesnt work for admins. - AK47317 - 10.03.2011

well this is awkward..


Re: Admin only zone doesnt work for admins. - Gemini - 10.03.2011

and it doesnt work still. I keep dieng when I enter the zone


Re: Admin only zone doesnt work for admins. - Mean - 10.03.2011

He doesn't use PlayerInfo.
LAdmin uses AccInfo.
pawn Код:
if( AccInfo[ playerid ][ Level ] >= 1 )



Re: Admin only zone doesnt work for admins. - Gemini - 10.03.2011

I cant compile the script with that code, could you please download my pastebin file from the first post, and edit it with the working code? :S


Re: Admin only zone doesnt work for admins. - mprofitt - 10.03.2011

Quote:
Originally Posted by AK47317
View Post
yess perfect

add this
pawn Code:
if(PlayerInfo[playerid][Level] >= 1)
under the area..
HA HA


Re: Admin only zone doesnt work for admins. - Gemini - 10.03.2011

Help please. BUMP


Re: Admin only zone doesnt work for admins. - Gemini - 11.03.2011

bump