Option system
#1

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?
Reply
#2

Код:
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)
Reply
#3

Ty very much
Reply
#4

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
Reply
#5

Does it print the number at the message u send ?!?
Reply
#6

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)