onplayerdeath error
#1

i cant get the color to work here i got an error
the code:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	new playercash;
	SetPlayerHealth(killerid, 100);
	SetPlayerArmour(killerid, 100);
	GivePlayerMoney(killerid, 5000);
	SendDeathMessage(killerid, playerid, reason);
	new string[64], pname[MAX_PLAYER_NAME+1];
	GetPlayerName(playerid, pname, sizeof(pname));
	format(string, sizeof(string), "Congratulations you have killed %s !", pname);
	format(string, sizeof(string), "Congratulations you got $5000 for killing %s", pname);
	SendClientMessage(killerid, 0xFFFF00AA, -1, string);

	SetPlayerScore(killerid,GetPlayerScore(killerid)+1 );
	playercash = GetPlayerMoney(playerid);
	if (playercash > 0)
	{
	GivePlayerMoney(killerid, playercash);
	ResetPlayerMoney(playerid);
	}
	else
	{
	ResetPlayerMoney(playerid);
	}
	return 1;
	}
i got this error
Код:
C:\Users\Bojan\Desktop\samp server\LVDM\gamemodes\lvdm.pwn(317) : error 035: argument type mismatch (argument 3)
Reply
#2

change that line to
Код:
SendClientMessage(killerid, 0xFFFF00AA, string);
the -1 u put is a default white color..u cant have 2 colors, can you?
Reply
#3

thanx !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)