Solved.
#8

pawn Код:
#include <a_samp>

new PlayerVehicle[MAX_PLAYERS] = {-1,...};
new cars[] = { 400,401,402,404,405,410,411,413,415,418,419,421,422,424,426,429,434,436,439,442,
        445,451,458,446,467,470,474,475,477,478,479,480,482,483,489,491,492,495,496,500,
        505,506,507,516,517,518,525,526,527,529,533,534,535,536,540,541,542,543,545,546,
        547,549,550,551,554,555,558,559,560,561,562,565,566,567,568,575,576,579,580,585,
        587,589,600,602,603,604,605 };

public OnPlayerSpawn(playerid)
{
    if(PlayerVehicle[playerid] != -1) { DestroyVehicle(PlayerVehicle[playerid]); } // Delete Old car
// Check player coordinate and angle
    new
      Float:x,
      Float:y,
      Float:z,
      Float:Angle;
    GetPlayerPos(playerid, x, y, z);
    GetPlayerFacingAngle(playerid, Angle);
//------------------------------------------
    PlayerVehicle[playerid] = CreateVehicle(vehicle[random(sizeof(vehicle))], x, y, z, Angle, -1, -1, 60000); // Create Vehicle player position
    PutPlayerInVehicle(playerid, PlayerVehicle[playerid], 0);          // Player set vehicle driver
    LinkVehicleToInterior(vehicle, GetPlayerInterior(playerid));        // Vehicle Set Interior PLayer Interior
    SetVehicleVirtualWorld(vehicle, GetPlayerVirtualWorld(playerid));      // Vehicle Set VW ID Player VW ID.
       
//  Spawned[playerid] = 1;
//  StartedPlaying[playerid] = 1;
    return 1;
}
Reply


Messages In This Thread
Solved. - by Rzzr - 17.02.2010, 17:27
Re: Create random car - by Roperr - 17.02.2010, 17:30
Re: Create random car - by Rzzr - 17.02.2010, 17:33
Re: Create random car - by adsy - 17.02.2010, 17:35
Re: Create random car - by Rzzr - 17.02.2010, 17:42
Re: Create random car - by adsy - 17.02.2010, 18:39
Re: Create random car - by Rzzr - 17.02.2010, 19:12
Re: Create random car - by smeti - 17.02.2010, 19:29

Forum Jump:


Users browsing this thread: 1 Guest(s)