Hey Leute
ich wollte gerade ein Headshot system basteln aber das ist raus gekommen O.o
Beim Compilen:
ZitatAlles anzeigenC:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7654) : error 017: undefined symbol "ValideWaffe"
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7660) : error 017: undefined symbol "Headshot_ErmittleZielperson"
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7664) : error 029: invalid expression, assumed zero
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7664) : error 017: undefined symbol "Headshot_AntiSpam"
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7665) : error 029: invalid expression, assumed zero
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7665) : error 017: undefined symbol "Headshot_AntiSpam"
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7671) : warning 225: unreachable code
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7671) : error 029: invalid expression, assumed zero
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7671) : error 017: undefined symbol "ValideWaffe"
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7676) : error 017: undefined symbol "waffe"
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7681) : warning 225: unreachable code
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7681) : error 029: invalid expression, assumed zero
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7681) : error 017: undefined symbol "Headshot_ErmittleZielperson"
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7702) : error 017: undefined symbol "OnPlayerDeathEx"
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7715) : error 017: undefined symbol "OnPlayerDeathEx"
C:\Users\Basti\Desktop\Samp server\WoS 2.4\gamemodes\WoS.pwn(7728) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
13 Errors.
Die Zeilen:
[tabmenu]
ZitatAlles anzeigenif(GEDRUECKT(KEY_FIRE) && ValideWaffe(playerid))
{
if(!HAT_GESCHOSSEN(playerid))
{
SETZE_GESCHOSSEN(playerid);
SetTimerEx("Headshot_AntiSpam", 1000, false, "d", playerid);
Headshot_ErmittleZielperson(playerid);
}
}
forward Headshot_AntiSpam(playerid);
public Headshot_AntiSpam(playerid)
{
SETZE_NICHT_GESCHOSSEN(playerid);
return 1;
}
stock ValideWaffe(waffe)
{
new ValideWaffen[] = { WAFFE_SNIPER};
for(new index = 0; index < sizeof(ValideWaffen); index++)
{
if(GetPlayerWeapon(waffe) == ValideWaffen[index]) return 1;
}
return 0;
}
stock Headshot_ErmittleZielperson(playerid)
{
new Float:x,Float:y,Float:z,Float:FrontX,Float:FrontY,Float:FrontZ,Float:CamX,Float:CamY,Float:CamZ;
GetPlayerCameraFrontVector(playerid, FrontX, FrontY, FrontZ);
GetPlayerCameraPos(playerid, CamX, CamY, CamZ);
for(new Float:i = 0.0; i < 100; i = i + 0.5)
{
x = FrontX * i + CamX; y = FrontY * i + CamY; z = FrontZ * i + CamZ;
for(new zielperson = 0; zielperson < MAX_PLAYERS; zielperson ++)
{
if(IsPlayerConnected(zielperson))
{
if(zielperson != playerid)
{
if(SPIELER_GEDUCKT(zielperson))
{
if(IsPlayerInRangeOfPoint(zielperson, 0.3, x, y, z))
{
GameTextForPlayer(playerid, "~r~HEADSHOT", 2000, 6);
GameTextForPlayer(zielperson, "~r~HEADSHOT!", 2000, 6);
TOETESPIELER(zielperson);
OnPlayerDeathEx(zielperson, playerid);
#if defined SENDE_NACHRICHT
SendDeathMessage(playerid, zielperson, 34);
#endif
}
}
else
{
if(IsPlayerInRangeOfPoint(zielperson, 0.3, x, y, z - 0.7))
{
GameTextForPlayer(playerid, "~r~HEADSHOT", 2000, 6);
GameTextForPlayer(zielperson, "~r~HEADSHOT", 2000, 6);
TOETESPIELER(zielperson);
OnPlayerDeathEx(zielperson, playerid);
#if defined SENDE_NACHRICHT
SendDeathMessage(playerid, zielperson, 34);
#endif
}
}
}
}
}
}
return 1;
}
[/tabmenu]