Admin mode
#1

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
Reply
#2

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
Reply
#3

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);
Reply
#4

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)