SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 12/02/2017, 05:08 PM   #1
MiiSha
Big Clucker
 
MiiSha's Avatar
 
Join Date: Jan 2017
Posts: 71
Reputation: 2
Default Making Ammu-Nation Guns Command

Edit : FIXED

Last edited by MiiSha; 18/09/2017 at 08:26 AM.
MiiSha is offline   Reply With Quote
Old 12/02/2017, 05:12 PM   #2
GoldenLion
Gangsta
 
GoldenLion's Avatar
 
Join Date: Sep 2014
Location: Estonia
Posts: 944
Reputation: 142
Default Re: Making Ammu-Nation Guns Command

Code:
if {dialogid == 81)
There's a curly bracket. Change it to
Code:
if (dialogid == 81)
Also use a switch statement instead of 9 if statements.
Code:
switch (listitem)
{
    case 0:
    {
         //code
    }
    case 1:
    {
         //code
    }
}
and the same thing for dialog ids. Have a look here: http://wiki.sa-mp.com/wiki/Control_Structures#switch
GoldenLion is offline   Reply With Quote
Old 12/02/2017, 05:20 PM   #3
MiiSha
Big Clucker
 
MiiSha's Avatar
 
Join Date: Jan 2017
Posts: 71
Reputation: 2
Default Re: Making Ammu-Nation Guns Command

OMG I must be blind !!!
Thanks, and I was using the switch but when I got the problem I used if statements just to make sure where the problem is. I4m gonna reuse the switch
Thanks. Rep+ !

Last edited by MiiSha; 18/09/2017 at 08:26 AM.
MiiSha is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ammu nation. BoU3A Scripting Help 5 05/09/2013 07:28 PM
[FilterScript] ..::||::.. Ammu-nation GTA IV ..::||::.. Axelerre Filterscripts 56 25/11/2012 11:22 AM
[FilterScript] Ammu-Nation Buying Guns San1 Filterscripts 4 31/07/2012 11:12 PM
How do you buy guns on SA-MP at Ammu-Nation? XxXTieGuyXxX General 7 16/08/2009 08:29 AM


All times are GMT. The time now is 10:47 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.