SA-MP Forums Archive
SetPlayerColor - 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: SetPlayerColor (/showthread.php?tid=277479)



SetPlayerColor - Lower - 18.08.2011

So i'm new.

What i'm trying to do in my script is when player types a certain command, in this case "/ofwkgta" his Color would change, so for this im currently using 'SetPlayerColor' and i've defined my Color at the top of the script, its known as 'COLOR_AQUA'.

Now this all compiles well, but when i go in game to test, the command works, but the color doesn't change or anything? Can anyone help..

Here is code:
Код:
if(strcmp(cmd, "/ofwgkta", true) == 0) {
		SetPlayerColor(playerid,COLOR_AQUA);
		SendClientMessage(playerid,COLOR_AQUA,"Welcome.. Wolve");
		SetPlayerSkin(playerid, 180);
		return 1;
Anyone know the issue?


Re: SetPlayerColor - Ironboy - 18.08.2011

Try this
pawn Код:
if (strcmp("/ofwgkta", cmdtext, true, 10) == 0)
    {
        SetPlayerColor(playerid,COLOR_AQUA);
        SendClientMessage(playerid,COLOR_AQUA,"Welcome.. Wolve");
        SetPlayerSkin(playerid, 180);
        return 1;
    }



Re: SetPlayerColor - Lower - 18.08.2011

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
Try this
pawn Код:
if (strcmp("/ofwgkta", cmdtext, true, 10) == 0)
    {
        SetPlayerColor(playerid,COLOR_AQUA);
        SendClientMessage(playerid,COLOR_AQUA,"Welcome.. Wolve");
        SetPlayerSkin(playerid, 180);
        return 1;
    }
Works, thank you.


Re: SetPlayerColor - Ironboy - 18.08.2011

You are welcome.