14.06.2014, 10:47
Hello samp members i need some help based on this code:
I added the
because i couldn't make the killer to get +1 star each time he kills someone.Might you help me?(+1 rep to be given)
Код:
public OnPlayerDeath(playerid, killerid, reason) { if(GetPlayerWeapon(killerid) == 35) Kick(killerid); if(GetPlayerWeapon(killerid) == 36) Kick(killerid); if(GetPlayerWeapon(killerid) == 38) Kick(killerid); new gunname[32], string[64], fName[MAX_PLAYER_NAME], sName[MAX_PLAYER_NAME]; GetWeaponName(reason,gunname,sizeof(gunname)); GetPlayerName(playerid,fName,MAX_PLAYER_NAME); GetPlayerName(killerid,sName,MAX_PLAYER_NAME); format(string, sizeof(string), "%s has killed %s using a %s.", sName, fName, gunname); SendClientMessageToAll(0xFFFFFFAA,string); SetPlayerWantedLevel(killerid, 6); GivePlayerMoney(killerid, 5000); SendClientMessage(killerid,0x2641FEAA,"You won 5.000$ for killing!!"); SendDeathMessage(killerid, playerid, reason); SendClientMessage(playerid , 0x2641FEAA,"You died HAHAHAHAHAHAH"); return 1; }
Код:
SetPlayerWantedLevel(killerid, 6);