SA-MP Forums Archive
Admin mode - 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)
+--- Thread: Admin mode (/showthread.php?tid=498484)



Admin mode - Ananisiki - 03.03.2014

I have a little problem with my admin mode command, it saves your latest skin, health and so on (if you get on admin duty your armor & health gets infinity), but if i stay in a exploding car and die while i'm in admin mode, i respawn as the skin i've chosen, but if i go back to admin mode and back off, it stays still in the admin mode skin but i'm not in admin mode, and if a player is in admin mode and dies, i want him to still be in admin mode, not set it to 0


Re: Admin mode - KhaledElkhourashi - 03.03.2014

PHP код:
new AdminColor[MAX_PLAYERS];
new 
TempColor[MAX_PLAYERS];
if(!
strcmp("/amode"cmdtrue)) if(Logged[playerid] == 1)
    {
    if(
IsPlayerAdmin(playerid)) return 0;
    
tmp strtok(cmdtextidx);
    if (!
strlen(tmp)) return SendClientMessage(playeridCOLOR_WHITE"( ! ) USAGE: /amode 0 or 1");
    if (!
strcmp("1"tmptrue)) if(Logged[playerid] == 1)
    {
    if(
IsPlayerAdmin(playerid)) return 0;
             
AdminColor[playerid] = 1;
    
TempColor[playerid] = GetPlayerColor(playerid);
    
SendClientMessage(playeridCOLOR_RED"( ! ) You are now on Admin mode");
     
SetPlayerColor(playeridCOLOR_RED);
     return 
1;
     }
     if(!
strcmp("0",tmp,true)) if(Logged[playerid] == 1)
     {
    if(
IsPlayerAdmin(playerid))return 0;
    
SetPlayerColor(playerid,TempColor[playerid]);
             
AdminColor[playerid] = 0;
             
SendClientMessage(playeridCOLOR_RED"( ! ) You are no longer on Admin mode");
              }
           return 
1;
            } 
+REP me if I helped you


Re: Admin mode - Ananisiki - 03.03.2014

Actually, this is not what i need, i need something on OnPlayerDeath,

This is the stuff i have in my admin mode command;

pawn Код:
Duty[playerid] = 1;
and
pawn Код:
SetPVarInt(playerid, "Aduty", 1);



Re: Admin mode - Ananisiki - 03.03.2014

Bump