[pomoc]text za buy vozila

Započeo N1XTON, Februar 03, 2013, 19:12:14 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta: GTA RP (edit)
Problem:kako da dodam da kad igrac udje u vozilo koje se prodaje da mu pokaze poruku ev ja sam ovo dodavao al neradi :S


   else if(IsAnOwnableCar(vehicleid) && CarInfo[vehicleid][cLock] == 1 && CarInfo[vehicleid][cOwned] == 1)
      {
            format(string, sizeof(string), "Cijena %s(kucaj /v buy da kupis)",cValue);
           GameTextForPlayer(playerid, string, 2500, 3);

          
          if(PlayerInfo[playerid][pAdmin] >= 6 && AdminDuty[playerid] == 1) { }
          else
          {
             new Float:cx, Float:cy, Float:cz;
             GetPlayerPos(playerid, cx, cy, cz);
             JBC_SetPlayerPos(playerid, cx, cy, cz);
         }
      }
      }

   return 1;
}

To sto je oznaceno debljim slovima to sam ja dodavao

Dio scripte:ev onaj vrag /v buy else if(strcmp(x_nr,"buy",true) == 0)
        {
            if(IsAnOwnableCar(idcar))
            {
                if(PlayerInfo[playerid][pLevel] < 2)
    {
                    SendClientMessage(playerid, COLOR_GREY, "Morate biti barem lvl 2 da kupite vozilo!");
                    return 1;
    }
    if(SBizzInfo[1][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
return 1;
}
    if(PlayerInfo[playerid][pPcarkey] == 9999) { }
    else if(PlayerInfo[playerid][pPcarkey2] == 9999) { }
    else if(PlayerInfo[playerid][pPcarkey3] == 9999) { }
    else { SendClientMessage(playerid, COLOR_GREY, "   Vec posjedujete 3 vozila"); return 1; }
if(CarInfo[idcar][cOwned]==1)
{
    SendClientMessage(playerid, COLOR_GREY, "Neko vec posjeduje to vozilo");
    return 1;
}
if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue])
{
    if(PlayerInfo[playerid][pPcarkey] == 9999) { PlayerInfo[playerid][pPcarkey] = idcar; }
    else if(PlayerInfo[playerid][pPcarkey2] == 9999) { PlayerInfo[playerid][pPcarkey2] = idcar; }
    else if(PlayerInfo[playerid][pPcarkey3] == 9999) { PlayerInfo[playerid][pPcarkey3] = idcar; }
    else { return 1; }
CarInfo[idcar][cOwned] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);
SafeJBC_GivePlayerMoney(playerid,-CarInfo[idcar][cValue]);
SBizzInfo[1][sbTill] += 5000;
ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]);
SBizzInfo[1][sbProducts]--;
PlayerPlayMusic(playerid);
GameTextForPlayer(playerid, "~w~Cestitamo~n~Nemojte zaboraviti /v park da ga parkirate!", 5000, 3);
SendClientMessage(playerid, COLOR_GRAD2, "Cestitamo vam na novoj kupovini!");
SendClientMessage(playerid, COLOR_GRAD2, "Kucajte /vehiclehelp da vidite uputstva!");
SendClientMessage(playerid, COLOR_YELLOW2, "Sada mozete upaliti motor !");
gEngine[playerid] = 0;
engineOn[GetPlayerVehicleID(playerid)] = false;
DateProp(playerid);
OnPropUpdate();
OnPlayerUpdate(playerid);[/b]
Slika/video://
Pravim RP,DM,TDM,STUNT, Freeroam modove od 0 za pare, nacini placanja : Paypal ili banka


Citat: Blaeks poslato Februar 03, 2013, 20:15:07 POSLE PODNE
taj kod stavis po onplayerentervehicle
stavio sam al neradi
Pravim RP,DM,TDM,STUNT, Freeroam modove od 0 za pare, nacini placanja : Paypal ili banka

if(IsAnOwnableCar(newcar))
{
    if(CarInfo[newcar][cOwned]==0)
    {
        TogglePlayerControllable(playerid, 0);
        format(string,sizeof(string),"~w~Vozilo: %s~n~Cena: ~g~%d~n~~w~/v buy da kupite ovo vozilo~n~~r~/exit ~w~da izadjete iz vozila",CarInfo[newcar][cDescription],CarInfo[newcar][cValue]);
GameTextForPlayer(playerid,string,5000,5);
    }