Can someone Help ME
#2

Please don't mix tabs and spaces together when formatting code, it makes it really unorganized. Please just use tabs for our sake. I've spent the past few minutes organizing this for you.

This should also fix your problem. Let me know if there are any errors.

PHP код:
CMD:aduty(playeridparams[]) return SendClientMessage(playeridred,"Changed to /adminduty");
CMD:aoffduty(playeridparams[]) return SendClientMessage(playeridred,"Changed to /adminduty");
CMD:adminduty(playerid,params[])
{
    if(
PlayerInfo[playerid][Level] >= 1)
    {
        if(
AntiSK[playerid] == 0)
        {
            new 
prevSkinprevTeamprevColor;
            if(
PlayerInfo[playerid][OnDuty] == 0)
            {
                
PlayerInfo[playerid][OnDuty] = 1;
                new 
str[128], AdminName[28];
                
GetPlayerName(playeridAdminNamesizeof(AdminName));
                
format(strsizeof(str), "Administrator %s is now on Admin duty!"AdminName);
                
SendClientMessageToAll(0xF600F6FFstr);
                
prevSkin GetPlayerSkin(playerid);
                
prevTeam GetPlayerTeam(playerid);
                
prevColor GetPlayerColor(playerid);
                
SetPlayerSkin(playerid,217);
                
SetPlayerTeam(playerid,6);
                
SetVehicleHealth(VID[playerid], 9999999999.0);
                
Duty[playerid] = Create3DTextLabel("On Duty Admin\n!!Do Not Attack!!"0xF600F6FF30.040.050.040.00);
                
Attach3DTextLabelToPlayer(Duty[playerid], playerid0.00.00.5);
                 
SetPlayerColor(playerid0xF600F6FF);
                
SetPlayerHealth(playerid100000000000);
                
SetPlayerArmour(playerid100000000000);
                 
ResetPlayerWeapons(playerid);
                
GivePlayerWeapon(playerid31,500);
                
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF" ");
                
Update3DTextLabelText(DM[playerid], 0xFFFFFFFF" ");
                
gTeam[playerid] = TEAM_MERC;
                
gClass[playerid] = CLASS;
            }
            else if(
PlayerInfo[playerid][OnDuty] == 1)
            {
                
PlayerInfo[playerid][OnDuty] = 0;
                new 
str[128], AdminName[28];
                
GetPlayerName(playeridAdminNamesizeof(AdminName));
                
format(strsizeof(str), "Administrator %s is now off Admin duty!"AdminName);
                
SendClientMessageToAll(0xFD01FDAAstr);
                
SetPlayerHealth(playerid0);
                
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF" ");
                
Update3DTextLabelText(Duty[playerid], 0xFFFFFFFF" ");
                
SetPlayerSkin(playeridprevSkin);
                
SetPlayerTeam(playeridprevTeam);
                
SetPlayerColor(playeridprevColor);
                
SetPlayerHealth(playerid100);
                
SetPlayerArmour(playerid100);
                
SpawnPlayer(playerid);
             }
        }
        else{
SendClientMessage(playerid,red,"You can't go when under Antisk");}
    }
    else{return 
0;}
    return 
1;

Reply


Messages In This Thread
Can someone Help ME - by ChunkyGaming26 - 29.08.2015, 23:46
Re: Can someone Help ME - by JordanZaundd - 30.08.2015, 00:33
Re: Can someone Help ME - by MBilal - 30.08.2015, 00:57

Forum Jump:


Users browsing this thread: 1 Guest(s)