23.03.2012, 18:18
Queria um pickup que quando passar ganhava um infernus ID ( 411 )
+rep
+rep
//Topo
new PickUpInfernus;
// OnGameModeInit
PickUpInfernus = CreatePickup(1239, 1, X, Y, Z, VW); // Ajuste
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == PickUpInfernus)
{
new Float:VBPos[3],CarID;
GetPlayerPos(playerid,VBPos[0],VBPos[1],VBPos[2]);
CarID = CreateVehicle(411, VBPos[0],VBPos[1],VBPos[2], 0.0,0, 0,-1);
PutPlayerInVehicle(playerid, CarID , 0);
}
return 1;
}
//topo
new vehiclePickup4, Vehicle4 = 411;//Infernus
//ongamemodeinit
vehiclePickup4 = CreatePickup(1272, 1, -235.6872,4141.0005,42.7278, 0);
public OnPlayerPickUpPickup(playerid, pickupid)
if(pickupid == vehiclePickup)
{
new Float:ppos[4];
GetPlayerPos(playerid, ppos[0], ppos[1], ppos[2]);
GetPlayerFacingAngle(playerid, ppos[3]);
Vehicle = CreateVehicle(462, ppos[0], ppos[1], ppos[2], ppos[3], 0, 0, (1000*1000));
PutPlayerInVehicle(playerid, Vehicle, 0);
}
public OnPlayerUpdate(playerid)
if(IsPlayerInRangeOfPoint(playerid, 1.5, 105.3965,4435.6367,1.0398))
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleID(playerid) != Vehicle)
{
DestroyVehicle(GetPlayerVehicleID(playerid));
SetPlayerPos(playerid, 105.3965,4435.6367,1.0398);
}
}