whats wrong ??
#6

pawn Код:
//#define PlayerInfo  //WTF????!
#include <a_samp>
#include <streamer>

new Text3D:ADMIN[MAX_PLAYERS], AdminDuty[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    ADMIN[playerid] = CreateDynamic3DTextLabel("_", 0xFFFFFF00, 0.0, 0.0, 0.5, 150.0, playerid, INVALID_VEHICLE_ID);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    DestroyDynamic3DTextLabel(ADMIN[playerid]);
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/adminduty", true) || !strcmp(cmdtext, "/aduty", true))
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][Level] > 0)
            {
                new str[128];
                if(AdminDuty[playerid] == 0)
                {
                    AdminDuty[playerid] = 1;
                    SetPVarInt(playerid, "SAVEDskin", GetPlayerSkin(playerid));
                    SetPlayerSkin(playerid, 0);
                    SetPlayerArmour(playerid, 999.0);
                    SetPlayerHealth(playerid, 999.0);
                    GetPlayerName(playerid, str, sizeof(str));
                    UpdateDynamic3DTextLabelText(ADMIN[playerid], 0xFFFFFFFF, "Admin ON-DUTY");
                    format(str, sizeof(str), "Admin [ID: %d] %s is now ON duty",playerid, str);
                    SendClientMessageToAll(COLOR_RED,str);
                    return 1;
                }
                else if(AdminDuty[playerid] == 1)
                {
                    AdminDuty[playerid] = 0;
                    SetPlayerSkin(playerid, GetPVarInt(playerid, "SAVEDskin"));
                    SetPlayerArmour(playerid, 0.0);
                    SetPlayerHealth(playerid, 100.0);
                    GetPlayerName(playerid, str, sizeof(str));
                    UpdateDynamic3DTextLabelText(ADMIN[playerid], 0xFFFFFF00, "_");
                    format(str, sizeof(str), "Admin [ID: %d] %s is now OFF duty", playerid, str);
                    SendClientMessageToAll(COLOR_WHITE,str);
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "You Are Not Admin");
                return 1;
            }
        }
        return 1;
    }
    return 0;
}
Remember to add this in LAdmin... It won't work as a separate filterscript!
It also uses Incognito's Streamer plugin
Reply


Messages In This Thread
whats wrong ?? - by [LHT]Bally - 26.09.2011, 19:58
Re: whats wrong ?? - by CmZxC - 26.09.2011, 20:02
Re: whats wrong ?? - by [LHT]Bally - 26.09.2011, 20:03
Re : whats wrong ?? - by Naruto_Emilio - 26.09.2011, 20:05
Re: whats wrong ?? - by Kingunit - 26.09.2011, 20:06
Respuesta: whats wrong ?? - by OPremium - 26.09.2011, 20:18
Re : Respuesta: whats wrong ?? - by Naruto_Emilio - 26.09.2011, 20:20
Re: whats wrong ?? - by [LHT]Bally - 26.09.2011, 21:45
Re: whats wrong ?? - by Kostas' - 26.09.2011, 21:56

Forum Jump:


Users browsing this thread: 1 Guest(s)