[Ajuda] AttachObjectToVehicle
#2

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(1864800, -1000000100);
    
AttachObjectToVehicle(objectNeon[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.8249990.000000, -0.5249990.0000000.0000000.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(vehicleidkillerid)
{
    
DestroyObject(objectNeon[vehicleid]);
    return 
true;

Coloque no comando de deletar veнculo do seu GM a funзгo:
Код:
DestroyObject(objectNeon[GetPlayerVehicleID(playerid)]);
Reply


Messages In This Thread
AttachObjectToVehicle - by B4dSh33p - 05.01.2017, 09:22
Re: AttachObjectToVehicle - by AuhMaru - 05.01.2017, 11:13
Re: AttachObjectToVehicle - by B4dSh33p - 05.01.2017, 11:49
Re: AttachObjectToVehicle - by HeisenGiromB - 05.01.2017, 16:21
Re: AttachObjectToVehicle - by B4dSh33p - 05.01.2017, 20:16
Re: AttachObjectToVehicle - by didimk157 - 05.01.2017, 20:25

Forum Jump:


Users browsing this thread: 1 Guest(s)