09.10.2017, 22:49
Variables
new vidao[MAX_PLAYERS] = 100;
new bool:PlayerObjectDamage[MAX_PLAYERS][MAX_MUEBLES];
System Craft
The object is not destroyed when shooting
THEY ARE OBJECTS "CreatePlayerObject"
Help
new vidao[MAX_PLAYERS] = 100;
new bool:PlayerObjectDamage[MAX_PLAYERS][MAX_MUEBLES];
System Craft
Код:
enum mdata
{
idmuebless,
idma,
Float:posx,
Float:posy,
Float:posz,
Float:rotx,
Float:roty,
Float:rotz,
Nombrecreador[MAX_PLAYER_NAME]
};
Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == BULLET_HIT_TYPE_PLAYER_OBJECT) {
if(IsValidPlayerObject(playerid, hitid)) {
if(PlayerObjectDamage[playerid][hitid] == true) {
vidao[hitid] -= random(90) + 1;
if(vidao[hitid] >= 0) {
new str[128];
format(str, sizeof(str), "~G~Vida! Objecto ID ~W~: ~R~ %d~ HP ~W~: ~R~ %d", hitid, vidao[hitid]);
GameTextForPlayer(playerid, str, 1800, 3);
}
if(vidao[hitid] <= 0) {
DestroyPlayerObject(playerid, hitid);
}
}
}
}
return 1;
}
THEY ARE OBJECTS "CreatePlayerObject"
Help


