VIP Locker Help -
ChuckyBabe - 07.03.2014
Hello,
this is my currently code
PHP код:
CMD:viplocker(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1416.7363, -1680.0768, 13.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(playerid, 1, DIALOG_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
Re: VIP Locker Help -
nmader - 07.03.2014
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.
}
}
}
Re: VIP Locker Help -
ChuckyBabe - 07.03.2014
And if he/she choose the SPAS-12 and other guns he will get the gun ?
Re: VIP Locker Help -
Abagail - 07.03.2014
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
Re: VIP Locker Help -
nmader - 07.03.2014
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);
Re: VIP Locker Help -
ChuckyBabe - 07.03.2014
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
Re: VIP Locker Help -
nmader - 09.03.2014
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.
Re: VIP Locker Help -
ChuckyBabe - 09.03.2014
bump!
how do i made this f*cking vip locker please help me i'am desperate !
+rep if u help
PHP код:
sorry for inconvenience
Re: VIP Locker Help -
Aerotactics - 09.03.2014
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.
Re: VIP Locker Help -
ChuckyBabe - 09.03.2014
I'am asking help not like that LOL!