15.06.2018, 03:42
ERRO
LINHA
SCRIPT COMPLETO
PHP код:
C:\Users\LUCAS\Desktop\[GM]ManiaticZone Freeroam (emus) (TESTES)\[GM]ManiaticZone Freeroam\filterscripts\HeadShot.pwn(38) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
PHP код:
#include <a_samp>
#include <zcmd>
new bool:HeadShoot;
public OnFilterScriptInit()
{
HeadShoot = true;
return 1;
}
CMD:HeadShoot(playerid)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "Debes ser un administrador para usar este comando.");
if(HeadShoot == false){HeadShoot = true;}
else{HeadShoot = false;}
new str_t[83];
format(str_t, sizeof(str_t), "El administrador %s ha %s el sistema de Head Shot",Nombre(playerid), HeadShoot == false ? ("desactivado") : ("activado"));
SendClientMessageToAll(HeadShoot == false ? (0xFF0000FF) : (0x00FF00FF), str_t);
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
{
if(HeadShoot == true)
{
new str_hs[95];
format(str_hs, sizeof(str_hs), "[HeadShoot] {FFFFFF}%s te ha disparado en la cabeza usando una Sniper.", Nombre(issuerid));
SendClientMessage(playerid, 0x33CCFFAA, str_hs);
GameTextForPlayer(playerid, "~r~HeadShoot!", 3000, 3);
SetPlayerAttachedObject(playerid, 1, 18668, 15, -0.052946, -0.209805, 0.302906, 0.000000, 0.000000, 0.000000, 1.438930, 1.000000, 1.000000 );
SetPlayerHealth(playerid, 0.0);
str_hs = "\0";
format(str_hs, sizeof(str_hs), "[HeadShoot] {FFFFFF}Le disparaste a %s en la cabeza usando una Sniper.", Nombre(playerid));
SendClientMessage(issuerid, 0x33CCFFAA, str_hs);
GameTextForPlayer(issuerid, "~r~HeadShoot!", 3000, 3);
}
}
return 1;
}
stock Nombre(playerid)
{
new jNombre[24];
GetPlayerName(playerid, jNombre, 24);
return jNombre;
}