05.01.2017, 11:13
PHP код:
new objectNeon[MAX_PLAYERS];
CMD:neon(playerid)
{
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, -1, "Vocк nгo estб dentro de um veнculo!");
objectNeon[GetPlayerVehicleID(playerid)] = CreateObject(18648, 0, 0, -1000, 0, 0, 0, 100);
AttachObjectToVehicle(objectNeon[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.824999, 0.000000, -0.524999, 0.000000, 0.000000, 0.000000);
return true;
}
//Comando para remover o objeto.
CMD:rneon(playerid)
{
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, -1, "Vocк nгo estб dentro de um veнculo!");
DestroyObject(objectNeon[GetPlayerVehicleID(playerid)]);
return true;
}
//Se o veнculo fфr destruнdo irб remover o objeto.
public OnVehicleDeath(vehicleid, killerid)
{
DestroyObject(objectNeon[vehicleid]);
return true;
}
Код:
DestroyObject(objectNeon[GetPlayerVehicleID(playerid)]);