SA-MP Forums Archive
If playerscore = 3 get weapon help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: If playerscore = 3 get weapon help (/showthread.php?tid=121344)



If playerscore = 3 get weapon help - Alpha80 - 16.01.2010

Hey guys this is my first post on the board,
I need help on my script!
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  new playercash;
  
	if(killerid == INVALID_PLAYER_ID) {
    ResetPlayerMoney(playerid);
	} else {
		playercash = GetPlayerMoney(playerid);
		if(playercash > 0) {
		//	GivePlayerMoney(killerid, playercash);
		  GivePlayerMoney(killerid, 500);
			GivePlayerWeapon(killerid,WEAPON_RIFLE,50);
  		GivePlayerWeapon(killerid,WEAPON_COLT45,40);
      GivePlayerWeapon(killerid,WEAPON_MINIGUN,10);
      
      SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
      
      
      SendDeathMessage(playerid,killerid,reason);
      
      
      
			 if PlayerScore(killerid,GetPlayerScore(killerid) == 3) {    <----- Don't work
               GivePlayerWeapon(killerid,WEAPON_MP5,100);
               }



		//	ResetPlayerMoney(playerid);
		}
	}
  	return 1;
Please help me!


Re: If playerscore = 3 get weapon help - Takumi.WS - 16.01.2010

Sorry but i didn't understand what do you want to make, or what's not working ? any more details so we can help you out ?

Takumi_


Re: If playerscore = 3 get weapon help - MadeMan - 16.01.2010

pawn Код:
if (GetPlayerScore(killerid) == 3) {
    GivePlayerWeapon(killerid,WEAPON_MP5,100);
}