21.06.2011, 22:51
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
public OnGameModeInit()
{
CreateVehicle(...); // 1° veiculo id = 1
ChangeVehiclePaintjob(1, 1); // Veiculo 1, PaintJob 1
return 1;
}
public OnVehicleSpawn(vehicleid)
{
ChangeVehiclePaintjob(vehicleid, 1);
return 1;
}
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(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
//GetPlayerFacingAngle(playerid, a);
GetVehicleZAngle(carid, a);
if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)
{
if(PlayerInfo[playerid][pPcarkey] == 999 && PlayerInfo[playerid][pPcarkey2] == 999 & PlayerInfo[playerid][pPcarkey3])
{
SendClientMessage(playerid, COLOR_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(string, sizeof(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.", 10000, 3);
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(playerid, 1);
return 1;
}
}
}