SA-MP Forums Archive
Option system - 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)
+--- Thread: Option system (/showthread.php?tid=627054)



Option system - Loinal - 23.01.2017

PHP код:
new option[130];
if(
sscanf(params"s"option)) return SendClientMessage(playerid,0xFF0000F,"USAGE: /setvalue [Weaponname] [Value]");
if(
strcmp(option"Deagle"true) == 0
That is not working also how to use option with 3?


Re: Option system - X337 - 23.01.2017

Код:
new value, weaponid;
if(sscanf(params, "dk<weapon>", value, weaponid)) return SendClientMessage(playerid,0xFF0000F,"USAGE: /setvalue [Value] [WeaponName]"); // You need to put integer at first, and you can use sscanf kustom specifier to get weaponid by name
if(weaponid == 24) // Check if weaponid is a deagle (24)
If you want to put 3rd option, you can do like this:
Код:
sscanf(params, "ddk<weapon>", value, anothervalue, weaponid)



Re: Option system - Loinal - 23.01.2017

Ty very much


Re: Option system - Loinal - 23.01.2017

Quote:
Originally Posted by X337
Посмотреть сообщение
Код:
new value, weaponid;
if(sscanf(params, "dk<weapon>", value, weaponid)) return SendClientMessage(playerid,0xFF0000F,"USAGE: /setvalue [Value] [WeaponName]"); // You need to put integer at first, and you can use sscanf kustom specifier to get weaponid by name
if(weaponid == 24) // Check if weaponid is a deagle (24)
If you want to put 3rd option, you can do like this:
Код:
sscanf(params, "ddk<weapon>", value, anothervalue, weaponid)
thanks


Re: Option system - ThatFag - 23.01.2017

Does it print the number at the message u send ?!?


Re: Option system - Lordzy - 23.01.2017

Be more specific - what are you trying to change here by referring to value? The weapon ID?


Re: Option system - Loinal - 23.01.2017

Quote:
Originally Posted by Lordzy
Посмотреть сообщение
Be more specific - what are you trying to change here by referring to value? The weapon ID?
No iam trying to change the money value to buy the deagle from /buyweapons