VIP Locker Help
#1

Hello,

this is my currently code

PHP код:
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;

And now i don't know how to put function on that

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
Reply
#2

Well, you would go onto OnDialogResponse, and follow the syntax. Personally I perfer to do:
pawn Код:
switch(dialogid)
{
    case 1:
    {
        switch(listitem):
        {
             case 0: //your first item reaction, so in your case, it'd be healing your player.
        }
    }
}
Reply
#3

And if he/she choose the SPAS-12 and other guns he will get the gun ?
Reply
#4

You could use OnDialogResponse... It's nice to learn things, and do them for yourself instead of having others do it for you... I've even included a link to the wiki page for dialogs/ondialogresponse below. Your welcome.

https://sampwiki.blast.hk/wiki/OnDialogResponse
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply
#5

Quote:
Originally Posted by ChuckyBabe
Посмотреть сообщение
And if he/she choose the SPAS-12 and other guns he will get the gun ?
Yes, for that (under the appropriate section of OnDialogResponse) you could use
pawn Код:
GivePlayerWeapon(playerid, weaponid, ammo);
Reply
#6

Sorry i'am a new scripter and i don't know where i can put that code give you all .
if you can script or help me i will give +rep for you guys
Reply
#7

Quote:
Originally Posted by ChuckyBabe
Посмотреть сообщение
Sorry i'am a new scripter and i don't know where i can put that code give you all .
if you can script or help me i will give +rep for you guys
We can help you. There are things such as GivePlayerWeapon(playerid, weaponid, ammo); which are default in samp. You can place this line of code anywhere where you want to give a player a weapon, specifying what weaponid you are using, and the ammo you wish to give the player.
Reply
#8

bump!

how do i made this f*cking vip locker please help me i'am desperate !

+rep if u help

PHP код:
sorry for inconvenience 
Reply
#9

Quote:
Originally Posted by ChuckyBabe
Посмотреть сообщение
bump!

how do i made this f*cking vip locker please help me i'am desperate !

+rep if u help

PHP код:
sorry for inconvenience 
They literally just wrote it out for you, first thing's first when it comes to learning how to script:
-learn as you go
-don't rely on others unless you ABSOLUTELY need it, and by that, I mean make an attempt first
-odds are, if you know how to do one thing, you can apply it to something else
-scripts aren't going to be handed to you
-don't get frustrated, it's not the end of the world
-patience young grasshopper, want to know how scripting works?
-First, you get an idea
-You act on that idea
-you struggle sometimes
-research your issue
-check the wikis (I STILL do that, even at the point of co-scripting an original server)
-the wikis help 95% of the time
-learn from your mistakes
-finish a script

Don't give up on yourself, do more research before posting angrily on the forums, you will find your answer in time.
Reply
#10

I'am asking help not like that LOL!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)