08.05.2017, 21:12
Estou criando esse sistema:
Sу que se eu atirar em uma arvore o bambi tambem desaparece, eu queria fazer o comando funcionar, apenas quando acertar o bambi, como eu faзo?
PHP код:
new BambiObject;
public OnGameModeInit()
{
BambiObject = CreateObject(19315, 1306.2416,-6287.4087,22.9276,60.3117,0.0000000,0.0000000,0.0000000); // bambi
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == 3)
{
if(IsValidObject(BambiObject))
{
SendClientMessage(playerid, -1, "Vocк matou o bambi!");
DestroyObject(BambiObject);
SetTimer("BambiVoltou", 1000, false);
}
}
return 1;
}
forward BambiVoltou(playerid);
public BambiVoltou(playerid)
{
CreateObject(19315, 1306.2416,-6287.4087,22.9276,60.3117,0.0000000,0.0000000,0.0000000); // bambi
return 1;
}