SA-MP Forums Archive
/shop doesn't working - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /shop doesn't working (/showthread.php?tid=278368)



/shop doesn't working - ServerScripter - 21.08.2011

hi , after, i have /shop 100% working , but now, whene i add Gates with Commands+ include zcmd, it is not working
i need help.


Re: /shop doesn't working - Improvement™ - 21.08.2011

It would be great if you show us your codes in the first place..
Or are you just expecting us to create a /shop for you?

Note: By "us", I am defining the "Topic/Theard Readers".
pawn Code:
#define us  "Theard Readers"



Re: /shop doesn't working - =WoR=Varth - 22.08.2011

I guess your /shop command made for OnPlayerCommandText.
You can't use that with zcmd.


Re: /shop doesn't working - ServerScripter - 22.08.2011

it is the command :
pawn Code:
if (strcmp("/shop", cmdtext, true, 10) == 0)

{
if(gTeam[playerid] == TEAM_ZOMBIE)
{
SendClientMessage(playerid, 0x9EC73DAA,"Zombies can't buy Guns !");
}
else
{
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Choose a gun to buy", "M4 \
     {F81414}$3000(100ammo) \nAK-47  {F81414}$1500(100ammo) \nBazooka  {F81414}$10000(10Ammo) \n\
    Sniper Rifle  {F81414}$7000(50ammo) \nGrenades  {F81414}$8000(10ammo) \nMolotov  {F81414}$400(10ammo)\
     \nColt  {F81414}$500(100ammo) \nCombat Shotgun  {F81414}$6000(100ammo) \nUZI  {F81414}$900(100ammo) \
     \nMP5  {F81414}$1000(100ammo) \n   "
, "Buy", "Cancel"); // You can change the dialog ID to your own
}
    return 1;
}
i have six warnings in the GM ;
Code:
C:\DOCUME~1\mrich\Bureau\ANEPAS~1\ZOMBIE~1\GAMEMO~1\ZMRP.pwn(842) : warning 202: number of arguments does not match definition
C:\DOCUME~1\mrich\Bureau\ANEPAS~1\ZOMBIE~1\GAMEMO~1\ZMRP.pwn(847) : warning 202: number of arguments does not match definition
C:\DOCUME~1\mrich\Bureau\ANEPAS~1\ZOMBIE~1\GAMEMO~1\ZMRP.pwn(860) : warning 202: number of arguments does not match definition
C:\DOCUME~1\mrich\Bureau\ANEPAS~1\ZOMBIE~1\GAMEMO~1\ZMRP.pwn(865) : warning 202: number of arguments does not match definition
C:\DOCUME~1\mrich\Bureau\ANEPAS~1\ZOMBIE~1\GAMEMO~1\ZMRP.pwn(881) : warning 202: number of arguments does not match definition
C:\DOCUME~1\mrich\Bureau\ANEPAS~1\ZOMBIE~1\GAMEMO~1\ZMRP.pwn(895) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Warnings.



Re: /shop doesn't working - serman - 22.08.2011

Show us your includes

and if u put <zcmd> so remove it.. and then try


Re: /shop doesn't working - [MWR]Blood - 22.08.2011

Maybe show us the lines with the warnings


Re: /shop doesn't working - [WoF]Sonny - 22.08.2011

Try this


if (strcmp("/shop", cmdtext, true, 10) == 0)

{
if(gTeam[playerid] == TEAM_ZOMBIE)
{
SendClientMessage(playerid, 0x9EC73DAA,"Zombies can't buy Guns !");
}
else
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Choose a gun to buy", "M4 \
{F81414}$3000(100ammo) \nAK-47 {F81414}$1500(100ammo) \nBazooka {F81414}$10000(10Ammo) \n
Sniper Rifle {F81414}$7000(50ammo) \nGrenades {F81414}$8000(10ammo) \nMolotov {F81414}$400(10ammo)\
\nColt {F81414}$500(100ammo) \nCombat Shotgun {F81414}$6000(100ammo) \nUZI {F81414}$900(100ammo)
\nMP5 {F81414}$1000(100ammo) ", "Buy", "Cancel"); // You can change the dialog ID to your own
}
return 1;
}


Re: /shop doesn't working - [MWR]Blood - 22.08.2011

Quote:
Originally Posted by [WoF]Sonny
View Post
Try this


if (strcmp("/shop", cmdtext, true, 10) == 0)

{
if(gTeam[playerid] == TEAM_ZOMBIE)
{
SendClientMessage(playerid, 0x9EC73DAA,"Zombies can't buy Guns !");
}
else
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Choose a gun to buy", "M4 \
{F81414}$3000(100ammo) \nAK-47 {F81414}$1500(100ammo) \nBazooka {F81414}$10000(10Ammo) \n
Sniper Rifle {F81414}$7000(50ammo) \nGrenades {F81414}$8000(10ammo) \nMolotov {F81414}$400(10ammo)\
\nColt {F81414}$500(100ammo) \nCombat Shotgun {F81414}$6000(100ammo) \nUZI {F81414}$900(100ammo)
\nMP5 {F81414}$1000(100ammo) ", "Buy", "Cancel"); // You can change the dialog ID to your own
}
return 1;
}
Am I blind, would you show me the difference between his and your code?


Re: /shop doesn't working - [WoF]Sonny - 22.08.2011

To much \n


Re: /shop doesn't working - ServerScripter - 22.08.2011

Quote:
Originally Posted by Delux13
View Post
Am I blind, would you show me the difference between his and your code?
yea LOL