14.11.2015, 01:42
pawn Код:
if (!strcmp("/Landstalker", cmdtext, true))
{
if(CreoVehiculo[playerid] == 1)
{
DestroyVehicle(playerid);
CreoVehiculo[playerid] = 1;
new Float:X,Float:Y,Float:Z,Float:ROT;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle (playerid,ROT);
SpawnAuto[playerid] = CreateVehicle(400,X,Y,Z,ROT, -1, -1, 60); SetVehiclePos(SpawnAuto[playerid], X, Y, Z);
PutPlayerInVehicle(playerid,SpawnAuto[playerid],0);
return 1;
}
if(CreoVehiculo[playerid] == 0)
{
CreoVehiculo[playerid] = 1;
new Float:X,Float:Y,Float:Z,Float:ROT;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle (playerid,ROT);
SpawnAuto[playerid] = CreateVehicle(400,X,Y,Z,ROT, -1, -1, 60); SetVehiclePos(SpawnAuto[playerid], X, Y, Z);
PutPlayerInVehicle(playerid,SpawnAuto[playerid],0);
return 1;
}
}