15.03.2015, 20:57
Hello there, i am trying to make bulletproof shield, and im stuck at it.. ( So far its done for 1 player only, i will ad loops later )
Code dosent work as it should... i'v been trying with AttachObjectToPlayer aswell, no result after 2 hours.
Код:
if(strcmp(cmd, "/dshild", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (IsPlayerInRangeOfPoint(playerid, 6, 257.1108,78.0250,1003.6406))
{
if(!IsANg(playerid))
{
SendClientMessage(playerid,COLOR_GREY," Only army deltaforce can use this equipment.");
return 1;
}
shild = SetPlayerAttachedObject(playerid, 8, 18637, 4, 0.3, 0, 0, 0, 170, 270, 1, 1, 1);
return 1;
}
}
}
Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == 4)
{
if(hitid == shild)
{
return 0;
}
}
return 1;
}


