Server crashing because of /ffix
#1

Код:
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;
	}
This code crashes the server, i want it to fix the car fully.
Reply


Messages In This Thread
Server crashing because of /ffix - by 0ne - 25.09.2009, 12:10
Re: Server crashing because of /ffix - by MenaceX^ - 25.09.2009, 12:11
Re: Server crashing because of /ffix - by 0ne - 25.09.2009, 12:12
Re: Server crashing because of /ffix - by 0ne - 25.09.2009, 12:16
Re: Server crashing because of /ffix - by 0ne - 26.09.2009, 08:40
Re: Server crashing because of /ffix - by brett7 - 26.09.2009, 08:50
Re: Server crashing because of /ffix - by 0ne - 26.09.2009, 09:11
Re: Server crashing because of /ffix - by Amit_B - 26.09.2009, 10:46

Forum Jump:


Users browsing this thread: 1 Guest(s)