18.05.2009, 22:09
How can i get a car to spawn if i type like /alpha. But car spawns at my postion and chors
if(strcmp(cmd, "/nrg500", true) == 0) { new Float:x, Float:y, Float:z, Float:a; GetPlayerFacingAngle(playerid,a); GetPlayerPos(playerid, x, y, z); new car; car=CreateVehicle(522,x,y,z+4,a,-1,-1,30000); //change 522 to the car that you want spawn LinkVehicleToInterior(car,GetPlayerInterior( playerid)); PutPlayerInVehicle(playerid,car,0); if(PlayerInfo[playerid][pCar] != -1) CarDeleter(PlayerInfo[playerid][pCar]); PlayerInfo[playerid][pCar] = car; return 1;}
Originally Posted by caribe88
Colors Idk but here is the code so the car spawn on your possition
Код:
if(strcmp(cmd, "/nrg500", true) == 0) { new Float:x, Float:y, Float:z, Float:a; GetPlayerFacingAngle(playerid,a); GetPlayerPos(playerid, x, y, z); new car; car=CreateVehicle(522,x,y,z+4,a,-1,-1,30000); //change 522 to the car that you want spawn LinkVehicleToInterior(car,GetPlayerInterior( playerid)); PutPlayerInVehicle(playerid,car,0); if(PlayerInfo[playerid][pCar] != -1) CarDeleter(PlayerInfo[playerid][pCar]); PlayerInfo[playerid][pCar] = car; return 1;} |
if(strcmp(cmd, "/nrg500", true) == 0) { new Float:x, Float:y, Float:z, Float:a; GetPlayerFacingAngle(playerid,a); GetPlayerPos(playerid, x, y, z); new car; car=CreateVehicle(522,x,y,z+1,a,-1,-1,30000); //change 522 to the car that you want spawn LinkVehicleToInterior(car,GetPlayerInterior( playerid)); return 1;}