Pickup with weapon shop [HELP] -
Pokiri_Boii - 24.10.2012
Hey Guys..
I just need to add a pickup, and when a player goes through it, it should show a weapon dialogue, and asks the player to buy ...
I would be very glad indeed if you help me out .. !! i tried but i get many errors which confused me !
Re: Pickup with weapon shop [HELP] -
RedJohn - 24.10.2012
http://codegenerators.pl/shopdialog
Simple as that.
Re: Pickup with weapon shop [HELP] -
Pokiri_Boii - 24.10.2012
I just need it when i go through a pickup only .. i dont need it as a command !
Re: Pickup with weapon shop [HELP] -
ThePhenix - 24.10.2012
PHP код:
#include <a_samp>
//:...................
#define DIALOG_WEAPONS 3
//:...................
new weapon;
//:...................
public OnGameModeInit()
{
weapon = CreatePickup(1274, 2, 0.0, 0.0, 9.0);//Here goes the coordinates
return 1;
}
//:...................//:...................
//:...................
//:...................
//:...................
//:...................
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == weapon)
{
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "Deagle\nAK47\nShotgspa", "Buy", "Quit");
return 1;
}
//:...................
//:...................
//:...................
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_WEAPONS)
{
if(response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 29, 114);
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 30, 120);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 27, 280);
}
}
return 1;
}
return 0;
}
Re: Pickup with weapon shop [HELP] -
Pokiri_Boii - 25.10.2012
I did as same as yew... and got these errors !
PHP код:
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1970) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1970) : error 035: argument type mismatch (argument 6)
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1979) : warning 217: loose indentation
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1982) : warning 217: loose indentation
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1982) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1982) : error 004: function "OnDialogResponse" is not implemented
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1984) : error 017: undefined symbol "dialogid"
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1986) : error 017: undefined symbol "response"
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1989) : error 017: undefined symbol "listitem"
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1993) : error 017: undefined symbol "listitem"
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1997) : error 017: undefined symbol "listitem"
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(2007) : error 030: compound statement not closed at the end of file (started at line 1976)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
10 Errors.
Re: Pickup with weapon shop [HELP] -
-=Dar[K]Lord=- - 25.10.2012
PHP код:
#include <a_samp>
//:...................
#define DIALOG_WEAPONS 3
//:...................
new weapon;
//:...................
public OnGameModeInit()
{
weapon = CreatePickup(1274, 2, 0.0, 0.0, 9.0);//Here goes the coordinates
return 1;
}
//:...................//:...................
//:...................
//:...................
//:...................
//:...................
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == weapon)
{
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "Deagle\nAK47\nShotgspa", "Buy", "Quit");
}// The mistake was here the bracket was not closed :)
return 1;
}
//:...................
//:...................
//:...................
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_WEAPONS)
{
if(response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 29, 114);
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 30, 120);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 27, 280);
}
}
return 1;
}
return 0;
}
Re: Pickup with weapon shop [HELP] -
Pokiri_Boii - 25.10.2012
Thanks Dude.. +reputated..
Re: Pickup with weapon shop [HELP] -
-=Dar[K]Lord=- - 27.10.2012
No Prob Bro