02.03.2017, 09:52
(
Последний раз редактировалось BigGreen; 02.03.2017 в 10:29.
)
Hey there i've been trying to get this weapon damage that works with body parts but when i place the code under my OnPlayerTakeDamage it does not work i get this error
Also this is where i got the body damage system from https://sampforum.blast.hk/showthread.php?tid=488539
heres the code with at the way end
Note that the Tazer part is apart of the onplayertakedamage i don't know where to place the weapon damage ontop or bottom either way if i do the bottom i get that error what i had posted but if i put the damage ontop of the tazer i get this error
http://pastebin.com/1pSmjukB
Also this is where i got the body damage system from https://sampforum.blast.hk/showthread.php?tid=488539
Код:
C:\Users\Crap\Desktop\Roleplay server\gamemodes\RP1.pwn(34309) : error 010: invalid function or declaration C:\Users\Crap\Desktop\Roleplay server\gamemodes\RP1.pwn(34310) : error 010: invalid function or declaration C:\Users\Crap\Desktop\Roleplay server\gamemodes\RP1.pwn(34311) : error 010: invalid function or declaration C:\Users\Crap\Desktop\Roleplay server\gamemodes\RP1.pwn(34315) : error 010: invalid function or declaration C:\Users\Crap\Desktop\Roleplay server\gamemodes\RP1.pwn(34319) : error 010: invalid function or declaration C:\Users\Crap\Desktop\Roleplay server\gamemodes\RP1.pwn(34324) : error 010: invalid function or declaration C:\Users\Crap\Desktop\Roleplay server\gamemodes\RP1.pwn(34329) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors.
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if(Player[issuerid][Tazer] >= 1) { //new NearestPlayer = GetClosestPlayer(playerid), new string[128]; if(Groups[Player[issuerid][Group]][CommandTypes] == 1 || Groups[Player[issuerid][Group]][CommandTypes] == 4) { if(Player[playerid][Tazed] == 0) { if(GetDistanceBetweenPlayers(issuerid, playerid) < 12) { if(!IsPlayerInAnyVehicle(playerid)) { TogglePlayerControllable(playerid, false); ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1, 1, 1, 1, 1, 0, 1); format(string, sizeof(string), "* %s has fired their tazer at %s, stunning them.", GetName(issuerid), GetName(playerid)); NearByMessage(playerid, SCRIPTPURPLE, string); Player[playerid][Tazed] = 1; SetTimerEx("UntazePlayer", 10000, false, "d", playerid); } else return 1; } else { format(string, sizeof(string), "* %s has fired their tazer at %s, missing them.", GetName(issuerid), GetName(playerid)); NearByMessage(playerid, SCRIPTPURPLE, string); } } } } return 1; } if(!IsPlayerConnected(playerid)) return 0; if(!IsPlayerConnected(issuerid)) return 0; if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9) { SetPlayerHealth(playerid, 0.0); } if(issuerid != INVALID_PLAYER_ID && weaponid == 24 && bodypart == 9) { SetPlayerHealth(playerid, 65.0); } if(issuerid != INVALID_PLAYER_ID && weaponid == 24 && bodypart == 4) { SetPlayerHealth(playerid, 47.0); SetPlayerArmour(playerid, 47.0 } if(issuerid != INVALID_PLAYER_ID && weaponid == 24 && bodypart == 5) { SetPlayerHealth(playerid, 25.0); SetPlayerArmour(playerid, 25.0 } return 1; }
http://pastebin.com/1pSmjukB