SA-MP Forums Archive
How to change this? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to change this? (/showthread.php?tid=425233)



How to change this? - LeeXian99 - 25.03.2013

Well, I am having problem with this... Copied from LuxAdmin, just changing it for VIPs.

pawn Код:
CMD:vipgod(playerid,params[])
{
    if(IsPlayerVipMember(playerid))
    {
        if(AccInfo[playerid][God] == 0)
        {
            AccInfo[playerid][God] = 1;
            SetPlayerHealth(playerid,100000);
            SendClientMessage(playerid,green,"|- GodMod ON -|");
            return SendCommandToAdmins(playerid,"God");
            }
            else
            {
            AccInfo[playerid][God] = 0;
            SendClientMessage(playerid,red,"|- GodMod OFF -|");
            SetPlayerHealth(playerid, 100);
        }
        return GivePlayerWeapon(playerid,35,0);
    }
    else SendClientMessage (playerid, 0xFF000000, "ERROR: You're not a VIP member!");
    return 1;
}



Re: How to change this? - Avi Raj - 25.03.2013

please show us errors?


Re: How to change this? - LeeXian99 - 25.03.2013

Код:
C:\Users\Kelvin\Desktop\Scripting\filterscripts\VIP.pwn(183) : error 017: undefined symbol "AccInfo"
C:\Users\Kelvin\Desktop\Scripting\filterscripts\VIP.pwn(183) : warning 215: expression has no effect
C:\Users\Kelvin\Desktop\Scripting\filterscripts\VIP.pwn(183) : error 001: expected token: ";", but found "]"
C:\Users\Kelvin\Desktop\Scripting\filterscripts\VIP.pwn(183) : error 029: invalid expression, assumed zero
C:\Users\Kelvin\Desktop\Scripting\filterscripts\VIP.pwn(183) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: How to change this? - Avi Raj - 25.03.2013

Line no 183 ?


Re: How to change this? - Marco_Valentine - 25.03.2013

have you got accinfo defined? Also what line is 183


Re: How to change this? - LeeXian99 - 25.03.2013

Line 183: if(AccInfo[playerid][God] == 0)


Re: How to change this? - Marco_Valentine - 25.03.2013

nothing wrong with that line from what i can see. You got it defined properly?


Re: How to change this? - Avi Raj - 25.03.2013

Код:
CMD:vgodmodeon(playerid, params[])
{
    if(AccInfo[playerid][God] < 1) return SendClientMessage(playerid, COLOR_RED, "Only VIP Can do it.");
    SetPlayerHealth(playerid, 10000.00);
    SendClientMessage(playerid,COLOR_CYAN,"God Mode is on.");
    return 1;
}

CMD:vgodmodeoff(playerid, params[])
{
    if(AccInfo[playerid][God] < 1) return SendClientMessage(playerid, COLOR_RED, "Only VIP Can do it.");
    SetPlayerHealth(playerid, 100.00);
    SendClientMessage(playerid,COLOR_CYAN,"God Mode is Off.");
    return 1;
}



Re: How to change this? - LeeXian99 - 25.03.2013

Fine, I figured out by myself, anyway, thanks.