/asellcar Problem
#1

I have a Role play mod. But mod have some bugs.
I type (out car) /asellcar , it works fine. But I type (in car) /asellcar, server crashes.
What can I do ?
Reply
#2

Please show us some code, We are not some magical beings that will tell you whats wrong without looking at the problem
Reply
#3

Код:
if(!strcmp(cmdtext, "/asellcar", true)) // sCk
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(gPlayerLogged[playerid] == 0)
	    {
	      SendClientMessage(playerid, COLOR_GREY, "  İlk olarak giriş yapınız !");
	      return 1;
	    }
	    if(!IsAtDealership(playerid))
	    {
	      SendClientMessage(playerid, COLOR_GREY, "  You are not at dealership ! ");
	      return 1;
	    }
	    if(PlayerInfo[playerid][pAdmin] >= 5)
	    {
	      new vehid = GetPlayerVehicleID(playerid);
	      new Float:x,Float:y,Float:z;
     		new Float:a;
     		CarInfo[vehid][cOwned] = 0;
     		strmid(CarInfo[vehid][cOwner], "Dealership", 0, strlen("Dealership"), 999);
     		PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
     		GameTextForPlayer(playerid, "~w~Araci Sattiniz", 10000, 3);
     		GetVehiclePos(vehid, x, y, z);
     		GetVehicleZAngle(vehid, a);
     		CarInfo[vehid][cLocationx] = x;
     		CarInfo[vehid][cLocationy] = y;
     		CarInfo[vehid][cLocationz] = z;
     		CarInfo[vehid][cAngle] = a;
     		RemovePlayerFromVehicle(playerid);
     		TogglePlayerControllable(playerid, 1);
     		OnPropUpdate();
     		DestroyVehicle(vehid);
				CreateVehicle(CarInfo[vehid][cModel],CarInfo[vehid][cLocationx],CarInfo[vehid][cLocationy],CarInfo[vehid][cLocationz]+1.0,CarInfo[vehid][cAngle],CarInfo[vehid][cColorOne],CarInfo[vehid][cColorTwo],60000);
	      return 1;
	    }
	    else
	    {
	      SendClientMessage(playerid, COLOR_GREY, "  Bu komutu Kullanamazsınız !");
	      return 1;
	    }
	  }
	  return 1;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)