OnPlayerSpawn Change Color - 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: OnPlayerSpawn Change Color (
/showthread.php?tid=586028)
OnPlayerSpawn Change Color -
Toxik - 18.08.2015
sup guys I cant configure out this
if player have [GC] tag in name his chat color change
but I want same color on name if possible in one server I saw a clan [PuN]Donny_
with 3 colors in tag
here is my codes
pawn Код:
CheckTAG(playerid)
{
new Nick[MAX_PLAYER_NAME + 1],string[55];
GetPlayerName(playerid,Nick,sizeof(Nick));
if(!strcmp(Nick,"[GC]",true,4))
{
string = "{FF0000}[G{FFFF00}C]{33CCFF}";
strcat(string, Nick[4]);
return string;
}
strcat(string,Nick);
return string;
}
public OnPlayerText(playerid,text[])
{
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"%s {00FFF0}: %s",CheckTAG(playerid),text); SendClientMessageToAll(GetPlayerColor(playerid),string);
return 1;
}
Those codes I added onplayerspawn
pawn Код:
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"%s {00FFF0}: %s",CheckTAG(playerid)); SetPlayerColor(playerid,string); //Line 49
ERROR
Код:
C:\Users\CraTzy\Desktop\Texture-Studio-master\gamemodes\bare.pwn(49) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.