SA-MP Forums Archive
Changing player color help - 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: Changing player color help (/showthread.php?tid=547359)



Changing player color help - Arastair - 22.11.2014

Hello,

i was looking for something that is very similar to /setmycolor or something like that but a little different,

i want the script to change the player's name color every 1 second, like it's flashing or something

every bit of help is very well appreciated


Re: Changing player color help - UltraScripter - 22.11.2014

for beging try this:

pawn Код:
forward Color1(playerid);

public Color1(playerid)
{
    SetPlayerColor(playerid, 0xFF0000FF); // red
    return 1;
}

forward Color2(playerid);

public Color2(playerid)
{
    SetPlayerColor(playerid, 0x00FF00FF); // green
    return 1;
}

forward Color3(playerid);

public Color3(playerid)
{
    SetPlayerColor(playerid, 0xFFFF00FF); // Yellow
    return 1;
}


public OnPlayerSpawn(playerid)
{
    SetTimer("Color1", 1000, false);
    SetTimer("Color2", 5000, false);
    SetTimer("Color3", 10000, false);
    return 1;
}



Re: Changing player color help - Ghazal - 22.11.2014

We are here for helping you, not scripting for you.


Re: Changing player color help - UltraScripter - 22.11.2014

sorry change it to this:
pawn Код:
forward Color1(playerid);

public Color1(playerid)
{
    SetPlayerColor(playerid, 0xFF0000FF); // red
    return 1;
}

forward Color2(playerid);

public Color2(playerid)
{
    SetPlayerColor(playerid, 0x00FF00FF); // green
    return 1;
}

forward Color3(playerid);

public Color3(playerid)
{
    SetPlayerColor(playerid, 0xFFFF00FF); // Yellow
    return 1;
}

CMD:setmycolor(playerid, params[])
{
    SetTimerEx("Color1", 1000, true, "i", playerid);
    SetTimerEx("Color2", 2000, true, "i", playerid);
    SetTimerEx("Color3", 3000, true, "i", playerid);
    return 1;
}
i didn't read all what u said sorry bro !...


Re: Changing player color help - Raweresh - 22.11.2014

It's not practical in my opinion. Try to set timer with refresh every 1000 miliseconds and use SetPlayerColor with random colors from that variable.


Re: Changing player color help - AdHaM612 - 22.11.2014

This FS was released by AleemIqbal1.
https://sampforum.blast.hk/showthread.php?tid=539096
Give it a try.


Re: Changing player color help - UltraScripter - 22.11.2014

hmm good idea i didn't think about it


Re: Changing player color help - Arastair - 22.11.2014

Quote:
Originally Posted by Maro06
Посмотреть сообщение
We are here for helping you, not scripting for you.
I didn't ask for a scripter dumb


Re: Changing player color help - Arastair - 30.11.2014

And thanks Ultra


Re: Changing player color help - UltraScripter - 30.11.2014

np bro and thx !.