15.05.2013, 22:23
Umh so, i finished scripting class system and inside of that i have the "Sniper" class, which gives extra score at who select this class and kill a player with sniper rifle. However, isn't working, the killer doesn't get score/money or even the message:
I placed that code inside OnPlayerDeath.
pawn Код:
if(reason == 34 && pInfo[killerid][Class] == 2) //reason == 34 is what i use for echo bots - class == 2 is the number of the class associated to "Sniper"
{
SCM(killerid, COLOR_YELLOW, "** Sniper Rifle kill as Sniper class! You got extra score/money and hp.");
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
GivePlayerMoney(killerid, 3000);
GameTextForPlayer(killerid, "~r~Sniper ~g~kill!", 3600, 4);
}