CallRemoteFunction -
Jstylezzz - 17.08.2012
Hi everyone,
Might be a stupid/nooby question, but I try to use a hex, or color value, inside the CallRemoteFunction..
CallRemoteFunction("FadePlayerScreenToColor","iii" ,playerid,0x000000FF,20);
As you can see, I use "iii"..
But, it's not working.
I thought, maybe it's because, a hex is not an Integer..
So, what should i use instead of "i" for the hex??
Thanks alot
Re: CallRemoteFunction -
Youarex - 17.08.2012
You could have found the answer here
https://sampwiki.blast.hk/wiki/CallRemoteFunction
pawn Code:
c Inserts a single character.
d, i Inserts an integer (whole) number
x Inserts a number in hexadecimal notation.
f Inserts a floating point number.
s Inserts a string.
Re: CallRemoteFunction -
Jstylezzz - 17.08.2012
Thanks..
I changed it but still, nothing happens..
here is my callremotefunction:
pawn Code:
CallRemoteFunction("FadePlayerScreen","ixi",playerid,0x000000FF,20);
and here, the function that is called, it comes out of the seifader include..
i use it like this, because when i used it in a filterscript, the textdraws from the gamemode won't show..
pawn Code:
stock FadePlayerScreen(playerid, color, speed)
{
colorfade[playerid] = color;
TextDrawBoxColor(screenfade[playerid], color);
TextDrawShowForPlayer(playerid, screenfade[playerid]);
SetTimerEx("ScreenFade", 100, 0, "ddd", playerid, color, speed);
}
//and, the function that is called by the timer:
forward ScreenFade(playerid, color, speed);
public ScreenFade(playerid, color, speed)
{
if (color <= (colorfade[playerid] - 255))
{
TextDrawHideForPlayer(playerid, screenfade[playerid]);
OnPlayerScreenFade(playerid, color, speed);
}
else
{
color -= speed;
if (color <= (colorfade[playerid] - 255)) color = (colorfade[playerid] - 255);
TextDrawBoxColor(screenfade[playerid], color);
TextDrawShowForPlayer(playerid, screenfade[playerid]);
SetTimerEx("ScreenFade", 100, 0, "ddd", playerid, color, speed);
}
}
I just copy/pasted, added the values from the include to my gamemode, but just nothing appears..
I did try to make my own system, but it never went smoothly, thus, i thought of using this snippets from the seifader include