Jump to content
  • 0

OnPlayerShootPlayer


k3nw00d_kri5ty

Question

Am o problema cu anti-team shot...

Imi da eroarea:

D:\Jocuri\Samp\Server sAmP StunT\gamemodes\FreeGaming.pwn(2328) : error 001: expected token: ")", but found "["
D:\Jocuri\Samp\Server sAmP StunT\gamemodes\FreeGaming.pwn(2328) : error 029: invalid expression, assumed zero
D:\Jocuri\Samp\Server sAmP StunT\gamemodes\FreeGaming.pwn(2328) : warning 215: expression has no effect
D:\Jocuri\Samp\Server sAmP StunT\gamemodes\FreeGaming.pwn(2328) : error 001: expected token: ";", but found "]"
D:\Jocuri\Samp\Server sAmP StunT\gamemodes\FreeGaming.pwn(2328) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Script:
public OnPlayerShootPlayer(shooter,target,Float:damage)
{
    if(gTeam[shooter][TEAM_COPS] == gTeam[target][TEAM_COPS])
    {
		new Float:newhealth;
	    GetPlayerHealth(target, newhealth);
	    newhealth = newhealth+sizeof(damage);
	    SetPlayerHealth(target, newhealth);
    }
    else return 1;
	return 1;
}
Linia:
if(gTeam[shooter][TEAM_COPS] == gTeam[target][TEAM_COPS])

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

AngeL=-" post="57914" timestamp="1298981226"]

pune o ; la acea linie, sar puta sa mearga xD

LOL

if(PlayerInfo[shooter][TEAM_COPS] == PlayerInfo[target][TEAM_COPS])
  
incearca asa :smiley: uite aici un tutorial: http://forum.sa-mp.com/showthread.php?p=1066961
Mai bine taci daca nu stii.
public OnPlayerShootPlayer(shooter,target,Float:damage)
{
	if(gTeam[shooter] == TEAM_COPS])
	{
		if(gTeam[target] == TEAM_COPS])
		{
			new Float:newhealth;
			GetPlayerHealth(target, newhealth);
			newhealth = newhealth+damage;
			SetPlayerHealth(target, newhealth);
		}
	}
	return 1;
}

*Nu stiu ce c?uta acolo sizeof(damage);.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.