/aduty Dont work Have verrry errors but cant show here.
#1

PHP код:
dcmd_aduty(playerid,params[])
{
    
#pragma unused params
    
if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0)
    {
        if(
aduty[playerid] == 0)
        {
        new 
Float:dutyhp;
        new 
Float:dutyarmour;
        
pDutyHealth[playerid] = GetPlayerHealth(playeriddutyhp);
        
pDutyArmour[playerid] = GetPlayerArmour(playeriddutyarmour);
        
SCM(playeridCOLOR_HOTPINK,"* You Have Gone On Duty.");
        
SetPlayerArmour(playerid9999999999);
        
SetPlayerHealth(playerid999999);
        
GivePlayerWeapon(playerid409999999);
        
GivePlayerWeapon(playerid399999999);
        
GivePlayerWeapon(playerid389999999);
        
SetPlayerColor(playerid0xFFFFFFFF);
        
oldskin[playerid] = GetPlayerSkin(playerid);
        
SetPlayerSkin(playerid294);
        
aduty[playerid] =1;
        }
        else
        {
        
SCM(playeridCOLOR_HOTPINK,"* You Have Gone Off Duty.");
        
SetPlayerHealth(playeridpDutyHealth[playerid]);
        
SetPlayerArmour(playeridpDutyArmour[playerid]);
        
SetPlayerHealth(playerid100);
        
SetPlayerArmour(playerid100);
        
ResetPlayerWeapons(playerid);
        
SetPlayerSkin(playeridoldskin[playerid]);
        
aduty[playerid] =0;
        
oldskin[playerid] =0;
        
GivePlayerWeapon(playerid999999);
        
GivePlayerWeapon(playerid2499999);
        
GivePlayerWeapon(playerid2699999);
        
GivePlayerWeapon(playerid2899999);
        
GivePlayerWeapon(playerid3199999);
        
GivePlayerWeapon(playerid2699999);
        
GivePlayerWeapon(playerid3499999);
    }else{
    
SendClientMessage(playeridCOLOR_ERROR"Unknown Command! Type /cmds For Available Commands.");
    }
    return 
1;

Reply
#2

Make Space !!
Reply
#3

Without the error, we're mostly unable to help you.
Reply
#4

Try This :
pawn Код:
dcmd_aduty(playerid,params[])
{
    #pragma unused params

    if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0)
    {

        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);
            SetPlayerHealth(playerid, 999999);
            GivePlayerWeapon(playerid, 40, 9999999);
            GivePlayerWeapon(playerid, 39, 9999999);
            GivePlayerWeapon(playerid, 38, 9999999);
            SetPlayerColor(playerid, 0xFFFFFFFF);
            oldskin[playerid] = GetPlayerSkin(playerid);
            SetPlayerSkin(playerid, 294);
            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;
            GivePlayerWeapon(playerid, 9, 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);

    }
    else
    {
        SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)