26.09.2009, 08:50
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);
RemovePlayerFromVehicle(playerid);
DestroyVehicle(curveh);
newveh = CreateVehicle(curveh,X,Y,Z,angle,color1,color2,600 00);
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;
}
if you swap those bits around does it still crash?
{
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);
RemovePlayerFromVehicle(playerid);
DestroyVehicle(curveh);
newveh = CreateVehicle(curveh,X,Y,Z,angle,color1,color2,600 00);
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;
}
if you swap those bits around does it still crash?