Posts: 19
Threads: 5
Joined: Jan 2011
Reputation:
0
Ok, this is impossible to do on my own (I suck at scripting)..
But when someone types in /shop, I want it to open the next time they spawn(Next death, basically). And I want it to say "Going to shop after death!" <--- I know how to do that part.. xD
And then after they die, it opens a box with a list of all buyable weapons, with prices next to them.. And I want the weapons to only give a certain amount of bullets at a time, not infinite. And once they die, they lose the weapons.
Could someone tell/show me how to make one? <3
Max_Coldheart
Unregistered
Yes you can.
first the id of the DIALOG_STYLE_LIST
then we make the cmd itself ( I use ZCMD here )
pawn Code:
CMD:shop(playerid, params[])
{
SendClientMessage(playerid, 0xFFFFFFFF, "Going To Shop After Death");
}
and under
add
pawn Code:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Shop", "MP5($6000)\nRifle($10000)\nDeagle($5000)","Buy", "Cancel");
Then we go to
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
there add:
pawn Code:
if(dialogid == 1)
{
switch(listitem)
{
case 0://MP5
{
GivePlayerWeapon(playerid, 29, 300);
GivePlayerMoney(playerid, -6000);
SendClientMessage(playerid, 0xFFFFFFFF, "You have bought an mp5 for $6000");
}
case 1://Rifle
{
GivePlayerWeapon(playerid, 33, 20);
GivePlayerMoney(playerid, -10000);
SendClientMessage(playerid, 0xFFFFFFFF, "You have bought an rifle for $10000");
}
case 2://Deagle
{
GivePlayerWeapon(playerid, 24, 100);
GivePlayerMoney(playerid, -5000);
SendClientMessage(playerid, 0xFFFFFFFF, "You have bought an deagle for $5000");
}
}
}
It should work.
Posts: 19
Threads: 5
Joined: Jan 2011
Reputation:
0
This doesn't work bro.. I want a weapon shop AFTER death (After they did /shop).. Not on every spawn.. And I don't want the /shop command just to say "Going to shop after death," I want it to actually bring them to it after death (ONLY ONCE).
I need a completely new shop script, the one you made doesn't compile errors, but it doesn't do shit IG.
Posts: 19
Threads: 5
Joined: Jan 2011
Reputation:
0
That doesn't do shit either...
Could someone else help me with this?