SA-MP Forums Archive
How to make Deagle 1 shot one kill, for a class - 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: How to make Deagle 1 shot one kill, for a class (/showthread.php?tid=414108)



How to make Deagle 1 shot one kill, for a class - Saadat - 08.02.2013

Topic says it all,

The class, i want it in to be.

Код:
if(team[issuerid] == TEAM_HUMAN)
	{
	    if(pInfo[issuerid][pHumanClass] == VIPSCOUT)
	    {
	        if(team[playerid] == TEAM_ZOMBIE)
	        {
	            if(weaponid == 34)
	            {
	            	SetPlayerHealth(playerid, -0);
				}
			}
		}
	}



Re: How to make Deagle 1 shot one kill, for a class - RajatPawar - 08.02.2013

Sorry, my bad.


Re: How to make Deagle 1 shot one kill, for a class - Saadat - 08.02.2013

I not that good scripter, learing/training scripter.

so

Errors
Код:
C:\Users\Saadat\Desktop\upload\gamemodes\zma.pwn(1332) : error 029: invalid expression, assumed zero
C:\Users\Saadat\Desktop\upload\gamemodes\zma.pwn(1332) : error 004: function "S@@_OnPlayerGiveDamage" is not implemented
C:\Users\Saadat\Desktop\upload\gamemodes\zma.pwn(1332) : warning 221: label name "Float" shadows tag name
C:\Users\Saadat\Desktop\upload\gamemodes\zma.pwn(1332) : warning 215: expression has no effect
C:\Users\Saadat\Desktop\upload\gamemodes\zma.pwn(1332) : warning 215: expression has no effect
C:\Users\Saadat\Desktop\upload\gamemodes\zma.pwn(1332) : error 001: expected token: ";", but found ")"
C:\Users\Saadat\Desktop\upload\gamemodes\zma.pwn(1332) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase



Re: How to make Deagle 1 shot one kill, for a class - George3654 - 08.02.2013

I don't know by heart all meanings of errors but here:
Код:
C:\Users\Saadat\Desktop\upload\gamemodes\zma.pwn(1332) : error 001: expected token: ";", but found ")"
You must put ";" at the end of the line. You have that "(script);" <-- Here must be the ";".

//Edit:
Код:
if(team[issuerid] == TEAM_HUMAN){
	    if(pInfo[issuerid][pHumanClass] == VIPSCOUT){
	        if(team[playerid] == TEAM_ZOMBIE){
	            if(weaponid == 34){
	            	SetPlayerHealth(playerid, -0);
		    }
		}
	    }
     return 1;
}
I think that code, which you use can be bad, but as you see, I edited this code, you must check this.


Re: How to make Deagle 1 shot one kill, for a class - ]Rafaellos[ - 08.02.2013

Check HERE.

It using SetPlayerHealth(playerid, 0.0);


Re: How to make Deagle 1 shot one kill, for a class - Saadat - 12.03.2013

Quote:
Originally Posted by Saadat
Посмотреть сообщение
Topic says it all,

The class, i want it in to be.

Код:
if(team[issuerid] == TEAM_HUMAN)
	{
	    if(pInfo[issuerid][pHumanClass] == VIPSCOUT)
	    {
	        if(team[playerid] == TEAM_ZOMBIE)
	        {
	            if(weaponid == 34)
	            {
	            	SetPlayerHealth(playerid, -0);
				}
			}
		}
	}
Thank you all for your help, but I fixed it my self.
I just changed the weapon id, from sniper to Deagle.