gasup showing for everybody who s gasuping
#1

pawn Код:
public Gasup(vehicleid,curgass,kof,mokejo,playerid)
{
    if(playerDB[playerid][pila])
    {
    if(GetPlayerMoneyA(playerid) >= kof)
    {
    if(vehicleDB[vehicleid][gas] < aBakai[GetVehicleModel(vehicleid)-400])
    {
    SetTimerEx("Gasup",1000,false,"iiiii",vehicleid,curgass+1,kof,mokejo+kof,playerid);
    vehicleDB[vehicleid][gas]++;
    GivePlayerMoneyA(playerid,-kof);
    new msg[150];
    new degalai[20];
    if(vehicleDB[vehicleid][dujos] == 1) degalai = "Benzin/Dujos";
    else if(vehicleDB[vehicleid][dyzelis] == 1 ) degalai = "Dyzelinas";
    else if(vehicleDB[vehicleid][benzinas] == 1 ) degalai = "Benzinas";
    new model = GetVehicleModel(vehicleid);
    format(msg,156,"~b~Masina:~y~%s~n~~b~Tarifas:~y~%iLT/L~n~~b~Ipilta:~g~%iL~n~~b~Suma:~r~%iLT~n~~b~Kuras:~g~%s~n~~b~Baikti su ~r~Enter",aVehicleNames[model-400],kof,curgass,mokejo,degalai);
    TextDrawSetString(Degaline2, msg);
    TextDrawShowForPlayer(playerid, Degaline1);
    TextDrawShowForPlayer(playerid, Degaline2);
    }else{
    TogglePlayerControllable(playerid,true);
    GameTextForPlayer(playerid,"Bakas pilnas",2000,5);
    playerDB[playerid][pila]=false;
    TextDrawHideForPlayer(playerid, Degaline1);
    TextDrawHideForPlayer(playerid, Degaline2);
    EndGasup(playerid,vehicleid,curgass,kof,mokejo);
    }
    }else{
    TogglePlayerControllable(playerid,true);
    GameTextForPlayer(playerid,"Jums nebeuztenka pinigu",2000,5);
    playerDB[playerid][pila]=false;
    TextDrawHideForPlayer(playerid, Degaline1);
    TextDrawHideForPlayer(playerid, Degaline2);
    EndGasup(playerid,vehicleid,curgass,kof,mokejo);
    }
    }else{
    TogglePlayerControllable(playerid,true);
    EndGasup(playerid,vehicleid,curgass,kof,mokejo);
    }
}
My english is bad but i try to explain, when you gasup your car only you is good, but when two players gasuping theyr cars gasup texdraw showing for both of them, one second mine car's gasup info and the another second his car gasup info, and it reapyting in seconds
Reply


Messages In This Thread
gasup showing for everybody who s gasuping - by ancezas - 16.03.2013, 07:15
Re: gasup showing for everybody who s gasuping - by Pottus - 16.03.2013, 07:20
Re: gasup showing for everybody who s gasuping - by ancezas - 16.03.2013, 07:22

Forum Jump:


Users browsing this thread: 2 Guest(s)