Pawno not saving
#4

Top of Script after Includes
Код:
new oldskin[MAX_PLAYERS]; // using this aduty can make many things 
new aduty[MAX_PLAYERS];
#define SCM SendClientMessage // IS FAST and Short :D
#define COLOR_HOTPINK 0xFF00FFFF
OnPlayerConnect(playerid) // add this
Код:
aduty[playerid] =0;
oldskin[playerid] =0;
add this with your other commands

Код:
if(strcmp(cmd, "/aduty", true) == 0)
	{
        if(PlayerInfo[playerid][pAdmin] < 2) return //any message u want to send if user is not admin
        if(aduty[playerid] == 0)
        {
        new Float:dutyhp;
        new Float:dutyarmour;
        pDutyHealth[playerid] = GetPlayerHealth(playerid, dutyhp);
        pDutyArmour[playerid] = GetPlayerArmour(playerid, dutyarmour);
        SCM(playerid, COLOR_HOTPINK,"* You Have Gone On Duty.");
        SetPlayerArmour(playerid, 9999999999); // Make 99999999 and it's infinite ammo
        SetPlayerHealth(playerid, 999999);
        GivePlayerWeapon(playerid, 38, 9999999);
        //oldskin[playerid] = GetPlayerSkin(playerid);
        //SetPlayerSkin(playerid, 294); // will set the user to wozie skin
        aduty[playerid] =1;
        }
        else
        {
        SCM(playerid, COLOR_HOTPINK,"* You Have Gone Off Duty.");
        SetPlayerHealth(playerid, pDutyHealth[playerid]);
        SetPlayerArmour(playerid, pDutyArmour[playerid]);
        SetPlayerHealth(playerid, 100);
        SetPlayerArmour(playerid, 100);
        ResetPlayerWeapons(playerid);
        SetPlayerSkin(playerid, oldskin[playerid]);
        aduty[playerid] =0;
        //oldskin[playerid] =0; // will bring the admin back to skin if used
        GivePlayerWeapon(playerid, 9, 99999);
        GivePlayerWeapon(playerid, 14, 99999);
        GivePlayerWeapon(playerid, 16, 99999);
        GivePlayerWeapon(playerid, 24, 99999);
        GivePlayerWeapon(playerid, 26, 99999);
        GivePlayerWeapon(playerid, 28, 99999);
        GivePlayerWeapon(playerid, 31, 99999);
        GivePlayerWeapon(playerid, 26, 99999);
        GivePlayerWeapon(playerid, 34, 99999);
        GivePlayerWeapon(playerid, 38, 99999);
        GivePlayerWeapon(playerid, 46, 99999);
        }
        return 1;
}
didn't add that admin's on duty this can make hackers stop hack or be careful
i don't know how to use strcmp cmds i use zcmd

And Compile It or it will not work tell me errors in Pm
Reply


Messages In This Thread
Pawno not saving - by DoomHunter - 11.03.2014, 14:09
Re: Pawno not saving - by DoomHunter - 11.03.2014, 14:24
Re: Pawno not saving - by Stinged - 11.03.2014, 14:42
Re: Pawno not saving - by AroseKhanNiazi - 11.03.2014, 14:47
Re: Pawno not saving - by DoomHunter - 11.03.2014, 15:27
Re: Pawno not saving - by DoomHunter - 12.03.2014, 17:27
Re: Pawno not saving - by CuervO - 12.03.2014, 17:42
Re: Pawno not saving - by DoomHunter - 12.03.2014, 18:06

Forum Jump:


Users browsing this thread: 1 Guest(s)