[Pedido]PaitJob
#1

Boas, ja reparei em alguns servers de stunts e drifts os carros tipo elegy, sultan etc tenhem novos paitjobs, ha algum Fs assim ? agradeзo
Reply
#2

pawn Код:
public OnGameModeInit()
{
     CreateVehicle(...); // 1° veiculo id = 1
     ChangeVehiclePaintjob(1, 1); // Veiculo 1, PaintJob 1
     return 1;
}

public OnVehicleSpawn(vehicleid)
{
     ChangeVehiclePaintjob(vehicleid, 1);
     return 1;
}
ID Dos PaintJobs. Espero ter Ajudado
Reply
#3

Obrigado, porque que o paitjob so aparece quando aperto F para entrar no carro? porque nao fica com o paitjob? tipo eu meti depois fiz /v estacionar e agora so quando aperto F e que se ve o paitjob e as outras modificaзoes
agradeзo =D
Reply
#4

Hmm.. como й o seu sistema de salvar veiculos? Й igual ao do The GodFather?
Reply
#5

nao, vou mandar o comando do /v estacionar

PHP код:
else if(strcmp(x_nr,"estacionar",true) == 0)
            {
                new 
Float:x,Float:y,Float:z;
                new 
Float:a;
                new 
carid;
                new 
getcarid;
                if(
GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { carid PlayerInfo[playerid][pPcarkey]; }
                else if(
GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid PlayerInfo[playerid][pPcarkey2]; }
                else if(
GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { carid PlayerInfo[playerid][pPcarkey3]; }
                else { return 
1; }
                
getcarid GetPlayerVehicleID(playerid);
                
GetPlayerName(playeridplayernamesizeof(playername));
                
GetVehiclePos(caridxyz);
                
//GetPlayerFacingAngle(playerid, a);
                
GetVehicleZAngle(carida);
                if(
IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)
                {
                       if(
PlayerInfo[playerid][pPcarkey] == 999 && PlayerInfo[playerid][pPcarkey2] == 999 PlayerInfo[playerid][pPcarkey3])
                    {
                        
SendClientMessage(playeridCOLOR_RED"Vocк nгo й dono de um carro.");
                        return 
1;
                    }
                    if(
getcarid == carid)
                    {
                        
CarInfo[carid][cLocationx] = x;
                        
CarInfo[carid][cLocationy] = y;
                        
CarInfo[carid][cLocationz] = z;
                        
CarInfo[carid][cAngle] = a;
                        
format(stringsizeof(string), "~n~ Vocк estacionou o seu veнculo nesta posiзгo. ~n~");
                        
GameTextForPlayer(playerid"Vocк estacionou o seu veнculo nesta posiзгo. Ele vai reaparecer aqui."100003);
                        
OnPropUpdate();
                        
OnPlayerUpdate(playerid);
                        
DestroyVehicle(carid);
                        
CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
                        
TogglePlayerControllable(playerid1);
                        return 
1;
                       }
                }
            } 
Reply
#6

Sim, й igual ao do The GodFather. Acho que no OnGameModeInit deve ter algo do tipo:
for(new i = 0; i < sizeof(CarInfo); i++)
{
CreateVehicle(...);
}

Ai vc coloca um
ChangeVehiclePaintjob.
Reply
#7

mas tipo se fasso ai createvehicle o carro nnao tem dono e que, o meu rp os carros para comprar tao em bloco de notas
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)