onplayerdeath error - 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: onplayerdeath error (
/showthread.php?tid=385125)
onplayerdeath error -
Wonderweiss - 14.10.2012
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)
Re: onplayerdeath error -
[HK]Ryder[AN] - 14.10.2012
change that line to
Код:
SendClientMessage(killerid, 0xFFFF00AA, string);
the -1 u put is a default white color..u cant have 2 colors, can you?
Re: onplayerdeath error -
Wonderweiss - 14.10.2012
thanx !