SA-MP Forums Archive
VIP LOCKER HELP ! - 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: VIP LOCKER HELP ! (/showthread.php?tid=500246)



VIP LOCKER HELP ! - ChuckyBabe - 12.03.2014

Hello this is my already got code

PHP Code:
CMD:viplocker(playeridparams[]) 

    if(!
IsPlayerInRangeOfPoint(playerid3.01416.7363, -1680.076813.5469)) return SendClientMessage(playerid,-1"Error: You're not near the locker."); //seeing if a player is in range of x, y, z. If not, send the message. 
    
if(PlayerInfo[playerid][pDonator] > 1//Checking to see if their a vip. //VIP LOCKER credits to: rangerxll 
    

        
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"VIP Locker""VIP Heal\nVIP Armor\nVIP Weapons""Select""Cancel"); //showing the locker menu. 
    

    return 
1

PHP Code:
switch(dialogid)
{
    case 
1:
    {
        switch(
listitem):
        {
             case 
0//your first item reaction, so in your case, it'd be healing your player.
        
}
    }

PHP Code:
GivePlayerWeapon(playeridweaponidammo); 
I have all of that code but i don't know where to put it and i don't know how to put function on

like example if he/she choose VIP Heal he will be fully healed
in armor he/she will get full armor
and VIP weapons if he/she clicked that
another dialog box will be opened
and there is
SPAS-12
M4A1
Sniper
Sawn-Off Shotgun
and other VIP Guns
can someone help me here ? i'am willing to give you +rep

Can u help me

NOTE: i'am a new scripter and all my VIP's want a VIP locker please help me


Re : VIP LOCKER HELP ! - Clad - 12.03.2014

PHP Code:
if(dialogid == 1)
        {
            if(
response)
            {
                   if (
listitem == 1)
                {
                    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 1)
                    {
                        if(
PlayerInfo[playerid][pRank] >= 1)
                        {
                                       
GivePlayerHeal(playerid100);
                            
OnSwatDuty[playerid] = 0;
                            
GetPlayerName(playeridsendernamesizeof(sendername));
                            
format(stringsizeof(string), "* %s has got full HP"sendername);
                            
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                        }
                    }
                   } 



Re: VIP LOCKER HELP ! - ChuckyBabe - 12.03.2014

@Clad where i will put it and fix it [pDonator]


Re : VIP LOCKER HELP ! - Clad - 12.03.2014

I gave my Dialog of Factions remove it and make it to pDonator


Re: VIP LOCKER HELP ! - ChuckyBabe - 12.03.2014

Where i will put it in my GM ?


Re : VIP LOCKER HELP ! - Clad - 12.03.2014

Any place you want.


Re: VIP LOCKER HELP ! - ChuckyBabe - 12.03.2014

Do you have in

PHP Code:
nVIP Armor\nVIP Weapons 
in VIP weapons it will show another dialog and if he choose 1 of guns he will have it ?


Re : VIP LOCKER HELP ! - Clad - 12.03.2014

Use the same as Heal, But in place of GivePlayerHeal make GivePlayerWeapon but change also listitem


Re: VIP LOCKER HELP ! - ChuckyBabe - 12.03.2014

What is code in Armor ?


Re : VIP LOCKER HELP ! - Clad - 12.03.2014

GivePlayerArmor ?


Re: VIP LOCKER HELP ! - ChuckyBabe - 13.03.2014

Ok i will try