18.11.2015, 11:31
hi guys i got errors when i tryed to make a headshot code :P fix it plz
errors
PHP код:
public OnPlayerHeadshot(playerid, issuerid, weaponid)
{
//headshot system
if gHelmet[playerid] = true; /////////// Line 86
{
return 0;
}
if(AntiSK[playerid] = 1); ////////////////line 91
{
return 0;
}
switch(weaponid) ////////////////Line 96
{
case 34:
{
SetPlayerArmour(playerid, 0.0);
SetPlayerHealth(playerid, 0.0);
CallLocalFunction("OnPlayerDeath", "iii", playerid, issuerid, weaponid);
GameTextForPlayer(playerid, "~r~~HEADSHOT :D !", 5000, 3);
SendClientMessage(issuerid, COLOR_GREEN, "+1 Score & +$5000 extra!");
GivePlayerMoney(issuerid, 5000);
GivePlayerScore(issuerid, 1);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerPlaySound(issuerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
}
return 1;
}
PHP код:
C:\Users\SA-MP\Desktop\COD-RWW\pawno\include\GPABP.inc(1) : error 010: invalid function or declaration
C:\Users\SA-MP\Desktop\COD-RWW\gamemodes\codee.pwn(6183) : error 025: function heading differs from prototype
C:\Users\SA-MP\Desktop\COD-RWW\gamemodes\codee.pwn(6186) : warning 211: possibly unintended assignment
C:\Users\SA-MP\Desktop\COD-RWW\gamemodes\codee.pwn(6186) : error 001: expected token: "*then", but found ";"
C:\Users\SA-MP\Desktop\COD-RWW\gamemodes\codee.pwn(6186) : error 036: empty statement
C:\Users\SA-MP\Desktop\COD-RWW\gamemodes\codee.pwn(6191) : warning 225: unreachable code
C:\Users\SA-MP\Desktop\COD-RWW\gamemodes\codee.pwn(6191) : warning 211: possibly unintended assignment
C:\Users\SA-MP\Desktop\COD-RWW\gamemodes\codee.pwn(6191) : error 036: empty statement
C:\Users\SA-MP\Desktop\COD-RWW\gamemodes\codee.pwn(6196) : warning 225: unreachable code
PHP код:
new bool:gHelmet[MAX_PLAYERS];