[Include] SetPlayerPosEx
#9

Quote:
Originally Posted by [HK]Ryder[AN]
Посмотреть сообщение
Not bad. Easy to make. Good for first.

Btw ****** thanks for the tip. I am creating a small library and I would use that for sure.
Yeah i know! Chea thanks to ****** for the great tip i say xD!

Quote:
Originally Posted by Shadow_
Посмотреть сообщение
Its nice but very sinple to do.
Yeah simple but there was none like this so made it!

Quote:
Originally Posted by ******
Посмотреть сообщение
Not just "0", you can have any value as a default value, even on strings. From one of my libraries:

pawn Код:
stock Style:TD_Create(Float:x = 0.0, Float:y = 0.0, Float:letterX = 0.48, Float:letterY = 1.12, Float:textX = 1280.0, Float:textY = 1280.0, colour = 0xE1E1E1FF, boxColour = 0x80808080, bgColour = 0x000000FF, shadow = 2, outline = 0, align = _:td_align_none, font = 1, bool:proportional = false, bool:box = false, time = 0, name[] = "\1")
What's more, there are a lot of optional parameters there, you can specialise just one if you want:

pawn Код:
TD_Create(.box = true);
By specifying ".parameter = value" when you CALL the function, it will set that parameter to your chosen value and leave all others the same. You can also use "_" to mean "default":

pawn Код:
TD_Create(_, _, 0.5);
That will leave the first two parameters as their defaults, and set the third parameter to "0.5". You can even combine the two and don't have to do named parameters in order:

pawn Код:
TD_Create(_, _, 0.5, .box = true, .letterY = 1.0, .name = "A String");
The "box" parameter comes after the "letterY" parameter in the function definition, but because we specify the name, it can come before here.
Okay ****** that's confusing for me? If i put "_" somewhere so that will its value = to its default value? How will we define its default value then? Thanks for this explanation on Functions and Argument's.

Quote:
Originally Posted by Niko_boy
Посмотреть сообщение
Cool one!!
Thanks Amigo!
Reply


Messages In This Thread
SetPlayerPosEx - spsx.inc v1.1 - by Ballu Miaa - 28.02.2012, 09:12
Re: SetPlayerPosEx - by iTorran - 28.02.2012, 09:18
Re: SetPlayerPosEx - by Ballu Miaa - 28.02.2012, 09:22
Re: SetPlayerPosEx - by Ballu Miaa - 28.02.2012, 10:00
Re: SetPlayerPosEx - by Ballu Miaa - 28.02.2012, 11:04
Re: SetPlayerPosEx - by [HK]Ryder[AN] - 28.02.2012, 11:09
Re: SetPlayerPosEx - by Shadow_ - 28.02.2012, 11:16
Re: SetPlayerPosEx - by Niko_boy - 28.02.2012, 12:42
Re: SetPlayerPosEx - by Ballu Miaa - 28.02.2012, 12:50
Re: SetPlayerPosEx - by Y_Less - 28.02.2012, 13:04
Re: SetPlayerPosEx - by Ballu Miaa - 28.02.2012, 13:23
Re: SetPlayerPosEx - by legodude - 28.02.2012, 20:05
Re: SetPlayerPosEx - by Ballu Miaa - 29.02.2012, 02:26
Re: SetPlayerPosEx - by willzyyy - 29.02.2012, 04:01
Re: SetPlayerPosEx - by Ballu Miaa - 29.02.2012, 05:20
Re: SetPlayerPosEx - by Jochemd - 16.03.2012, 13:38
Re: SetPlayerPosEx - by Ballu Miaa - 16.03.2012, 16:45
Re: SetPlayerPosEx - by kacper55331 - 16.03.2012, 21:14
Re: SetPlayerPosEx - by Ballu Miaa - 23.03.2012, 00:40
Re: SetPlayerPosEx - by Krx17 - 23.03.2012, 00:56
Re: SetPlayerPosEx - by Crazymax - 29.04.2012, 17:54
Respuesta: SetPlayerPosEx - by irinel1996 - 29.04.2012, 22:11
Re: SetPlayerPosEx - by lucas_mdr1235 - 29.04.2012, 22:39
Re: SetPlayerPosEx - by rscaerzx - 29.04.2012, 23:42
Re: SetPlayerPosEx - by Ballu Miaa - 30.04.2012, 16:00
Re: SetPlayerPosEx - by FalconX - 01.05.2012, 19:35
Re: SetPlayerPosEx - by Ballu Miaa - 02.05.2012, 02:05

Forum Jump:


Users browsing this thread: 9 Guest(s)