if(strcmp(cmdtext, "/ffix", true) == 0) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { new curveh; new newveh; new Float:X,Float:Y,Float:Z; new Float:ang; new angle; new color1; new color2; curveh = GetPlayerVehicleID(playerid); GetPlayerPos(playerid,X,Y,Z); ang = GetVehicleZAngle(curveh,ang); GetVehicleColors(curveh,color1,color2); newveh = CreateVehicle(curveh,X,Y,Z,angle,color1,color2,60000); RemovePlayerFromVehicle(playerid); DestroyVehicle(curveh); SetVehicleZAngle(curveh,ang); PutPlayerInVehicle(playerid,newveh,0); GameTextForPlayer(playerid, "~p~Sutaisyta",5000,5); } else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { GameTextForPlayer(playerid, "Turi buti masinoi",5000,5); return 0; } else if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { GameTextForPlayer(playerid, "Turi buti vairuotojas",5000,5); return 0; } return 1; }
DestroyVehicle(curveh);
SetVehicleZAngle(curveh,ang);
Originally Posted by MenaceX^
I suppose this is the problem:
pawn Код:
|
if(strcmp(cmdtext, "/ffix", true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new curveh, newveh, model, Float:p[4], color1, color2;
curveh = GetPlayerVehicleID(playerid);
GetVehiclePos(curveh,p[0],p[1],p[2]);
GetVehicleZAngle(curveh,p[3]);
GetVehicleColors(curveh,color1,color2); // there are no GetVehicleColors function :X
model = GetVehicleModel(curveh);
DestroyVehicle(curveh);
newveh = CreateVehicle(model,p[0],p[1],p[2],p[3],color1,color2,60000);
PutPlayerInVehicle(playerid,newveh,0);
GameTextForPlayer(playerid, "~p~Sutaisyta",5000,5);
}
else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) return GameTextForPlayer(playerid, "Turi buti masinoi",5000,5);
else if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return GameTextForPlayer(playerid, "Turi buti vairuotojas",5000,5);
return 1;
}