02.11.2012, 05:34
pawn Код:
CALLBACK: ChangeVeh(IDPCmb)
{
for(new i = 0; i <MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInAnyVehicle(i) && JustUsed[i] == 0)
{
new vehicleid = GetPlayerVehicleID(i), color1, color2;
if(IsVehicleInRangeOfPoint(vehicleid,0.8,PickCam[IDPCmb][PX],PickCam[IDPCmb][PY],PickCam[IDPCmb][PZ]))
{
PlayerPlaySound(i, 1133, 0.0, 0.0, 0.0);
if(PickCam[IDPCmb][Type] == 0)
{
PlayerPlaySound(i, 1054, 0.0, 0.0, 0.0);
new Float:Velocidad[3], Float:X, Float:Y, Float:Z, Float:Angulo;
GetVehiclePos(vehicleid, X,Y,Z); GetVehicleZAngle(vehicleid,Angulo);
GetVehicleVelocity(vehicleid, Velocidad[0], Velocidad[1], Velocidad[2]);
GetVehicleColor(vehicleid, color1, color2); DestroyVehicle(vehicleid);
new NewVeh = CreateVehicle(PickCam[IDPCmb][IDNewCar],X,Y,Z,Angulo,color1,color2,180);
PutPlayerInVehicle(i,NewVeh,0);
SetVehicleVelocity(NewVeh, Velocidad[0], Velocidad[1], Velocidad[2]);
}
else if(PickCam[IDPCmb][Type] == 1) { AddVehicleComponent(vehicleid, 1010); }
else if(PickCam[IDPCmb][Type] == 2) { RepairVehicle(vehicleid); }
JustUsed[i] = 1; SetTimerEx("ReactivarT",900,0,"i",i);
}
}
}
}
return 1;
}
I need help , how to make it change my vehicle when i'am in another virtual world.
wizzi