SA-MP Forums Archive
'i' or 'u' - 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: 'i' or 'u' (/showthread.php?tid=432211)



'i' or 'u' - Saw® - 21.04.2013

Hey , in commands like /slap [playerid] , I need to use in sscanf the "i" or "u" ? what about money ?

pawn Код:
if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /slap [playerid] ");
thanks..


Re: 'i' or 'u' - lolumadd_ - 21.04.2013

'i' stands for integer.
'u' stands for user.

So for money, you want it to return an integer value, not a user.


Re: 'i' or 'u' - doreto - 21.04.2013

Код:
Specifier(s)			Name				Example values
	i, d			Integer				1, 42, -10
	c			Character			a, o, *
	l			Logical				true, false
	b			Binary				01001, 0b1100
	h, x			Hex				1A, 0x23
	o			Octal				045 12
	n			Number				42, 0b010, 0xAC, 045
	f			Float				0.7, -99.5
	g			IEEE Float			0.7, -99.5, INFINITY, -INFINITY, NAN, NAN_E
	u			User name/id (bots and players)	******, 0
	q			Bot name/id			ShopBot, 27
	r			Player name/id			******, 42



Re: 'i' or 'u' - Saw® - 21.04.2013

Quote:
Originally Posted by lolumadd_
Посмотреть сообщение
'i' stands for integer.
'u' stands for user.

So for money, you want it to return an integer value, not a user.
Quote:
Originally Posted by doreto
Посмотреть сообщение
Код:
Specifier(s)			Name				Example values
	i, d			Integer				1, 42, -10
	c			Character			a, o, *
	l			Logical				true, false
	b			Binary				01001, 0b1100
	h, x			Hex				1A, 0x23
	o			Octal				045 12
	n			Number				42, 0b010, 0xAC, 045
	f			Float				0.7, -99.5
	g			IEEE Float			0.7, -99.5, INFINITY, -INFINITY, NAN, NAN_E
	u			User name/id (bots and players)	******, 0
	q			Bot name/id			ShopBot, 27
	r			Player name/id			******, 42
yeah thanks both , I should learn the tutorial before posting...