06.09.2014, 20:32
Hello people I'm wanting urgent help someone, and I have to fix this, is this is this following command buggy auto park the vehicle:
But where is the bug? I do not know when I give /autoestacionar the vehicle or face moves nothing happens, I tried to get more gamemodes did not work, someone help me is urgent and important personal? !!
Код:
if(strcmp(cmd, "/autoestacionar", true) == 0)
{
if(PlayerInfo[playerid][pCarro] == 255)
{
SendClientMessage(playerid, COLOR_GREY,"You do not own a vehicle.");
return 1;
}
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid,COLOR_GREY,"You need to be on your vehicle.");
return 1;
}
new Float:x,Float:y,Float:z;
new Float:a;
new carid;
new getcarid;
if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)
{
getcarid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
GetVehicleZAngle(carid, a);
if(getcarid == carid)
{
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
GameTextForPlayer(playerid, "Your vehicle will respawn here.", 10000, 3);
OnPropUpdate();
OnPlayerUpdate(playerid);
DestroyVehicle(carid);
CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz],CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
TogglePlayerControllable(playerid,1);
SaveCars();
return true;
}
return true;
}
return true;
}

