Zeka_Peka228
Умник
Основа Individual. Когда там листаешь машины, то через где-то 3-4 крашит.
Вот код:
Или может знаете доработку Индивидуала где это исправленно? С меня +сик.:af:
Вот код:
PHP:
stock NextCar(playerid)
{
if(PlayerInfo[playerid][SalonInfo][1] > gettime()) return GameTextForPlayer(playerid,"Loading...",1000,3);
SetPVarInt(playerid, "SelectAvto", GetPVarInt(playerid, "SelectAvto") +1);
switch(GetPVarInt(playerid,"CarShop"))
{
case 0:if(GetPVarInt(playerid, "SelectAvto") >= 19) SetPVarInt(playerid, "SelectAvto", 0);//nope
case 1:if(GetPVarInt(playerid, "SelectAvto") >= 38) SetPVarInt(playerid, "SelectAvto", 20);//c
case 2:if(GetPVarInt(playerid, "SelectAvto") >= 56) SetPVarInt(playerid, "SelectAvto", 39);//d
case 3:if(GetPVarInt(playerid, "SelectAvto") >= 85) SetPVarInt(playerid, "SelectAvto", 72);//a
case 4:if(GetPVarInt(playerid, "SelectAvto") >= 71) SetPVarInt(playerid, "SelectAvto", 57);//b
}
return ShowingCar(playerid);
}
stock BackCar(playerid)
{
if(PlayerInfo[playerid][SalonInfo][1] > gettime()) return GameTextForPlayer(playerid,"Loading...",1000,3);
SetPVarInt(playerid, "SelectAvto", GetPVarInt(playerid, "SelectAvto")-1);
switch(GetPVarInt(playerid,"CarShop"))
{
case 0:if(GetPVarInt(playerid, "SelectAvto") <= 0) SetPVarInt(playerid, "SelectAvto", 19);//nope
case 1:if(GetPVarInt(playerid, "SelectAvto") <= 20) SetPVarInt(playerid, "SelectAvto", 38);//c
case 2:if(GetPVarInt(playerid, "SelectAvto") <= 39) SetPVarInt(playerid, "SelectAvto", 56);//d
case 3:if(GetPVarInt(playerid, "SelectAvto") <= 72) SetPVarInt(playerid, "SelectAvto", 85);//a
case 4:if(GetPVarInt(playerid, "SelectAvto") <= 57) SetPVarInt(playerid, "SelectAvto", 71);//b
}
return ShowingCar(playerid);
}
stock ShowingCar(playerid)
{
if(PlayerInfo[playerid][SalonInfo][0] != INVALID_VEHICLE_ID) DestroyVehicleEx(PlayerInfo[playerid][SalonInfo][0]);
PlayerInfo[playerid][SalonInfo][0] = CreateVehicleEx(ShopCar[GetPVarInt(playerid, "SelectAvto")][0],-1658.7123,1212.8981,20.9499,285.2443,1,1,-1);
SetVehicleVirtualWorld(PlayerInfo[playerid][SalonInfo][0], playerid+1);
PutPlayerInVeh(playerid,PlayerInfo[playerid][SalonInfo][0],0);
SetPlayerCameraPos(playerid,-1654.097045,1218.596679,22.708799);
SetPlayerCameraLookAt(playerid,-1659.106201,1210.380737,19.987318);
SetPVarInt(playerid,"BuyColor",-1);
SetPVarInt(playerid,"BuyColor1",-1);
format(stringer,BIG_SIZE,"~n~~n~~n~~n~~n~~n~~n~~n~~b~NAME: ~w~%s~n~~g~COST: ~w~%d~n~~y~COLOR1: ~w~-1 ~y~COLOR2: ~w~-1",VehicleNames[ShopCar[GetPVarInt(playerid, "SelectAvto")][0]-400],ShopCar[GetPVarInt(playerid, "SelectAvto")][1]);
GameTextForPlayer(playerid,stringer, 5000, 3);
format(stringer,SMALL_SIZE,"Model: %s~n~Cost: %d",VehicleNames[ShopCar[GetPVarInt(playerid, "SelectAvto")][0]-400],ShopCar[GetPVarInt(playerid, "SelectAvto")][1]);
PlayerTextDrawSetString(playerid,ShopText[playerid],stringer);
PlayerInfo[playerid][SalonInfo][1] = gettime()+1;
return 1;
}
