How do you take players' input and process it? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How do you take players' input and process it? (
/showthread.php?tid=90949)
How do you take players' input and process it? -
ThePS3Guy - 11.08.2009
I mean, I know how to make simple cmds to change your color, teleport you, etc. But I want to know this: A very amazing scripter (Backwards97) wrote a script to convert RGB color to Hex. How can I use this to let players choose their playercolor?
Re: How do you take players' input and process it? -
RSX - 11.08.2009
Ok, I could say you're wierd, but whatever.
1.Backwards97 script is amazing, but in this it would be pointless slower
2.You already made topic, but you haven't got it yet
3.You need to use this ConvertColor(R,G,B,A)return (R*16777216)+(G*65536)+(B*256)+A;
4.It would be in function:
SetPlayerColor(playerid,(R*16777216)+(G*65536)+(B* 256)+A);
That means you just need to get 4 or 3 if you in A place put 00 or 0xFF or 255, It would be like "/MyColor [Red] [Green] [Blue]"
Red=R
Green=G
Blue=B
Try to make more clear to you?
Re: How do you take players' input and process it? -
ThePS3Guy - 11.08.2009
OK, I could say that you're weird too. My other topic was getting the script to convert it this one was to actually use it. And no offense, but think I'm more clueless than I actually am. I mean I know how RGB to Hex works in real life, I know that r=red, I just don't have much experience with Pawno is a programming language. It's very different from the one I know. Thanks anyway.
Re: How do you take players' input and process it? -
RSX - 11.08.2009
I meant R,G,B as variable just in SetPlayerColor i used that R G B, but whatever, I think you now understand all...