[Pomoc] /createveh, /v sell KEY_YES

Započeo VuKaN
2. Feb. 2016. Zaključano
574
pregleda
13
postova
Joksa99
5
Crime Lord
2. Feb. 2016.
Skripta koju koristim: edit easy money
Opis problema o kojem se radi: kada kucam /createveh, napravi mi vozilo i unisti ga, tek posle restarta se to vozilo vidi i moze kupiti, eh sada ja hocu da kada napravim vozilo, da mi odmah stvori i da moze da se kupi.
Sto se tice /v sell, kada ga proda, odmah to vozilo nestane sa servera i kada se uradi restart ono se vrati i moze prodati, sada ja hocu da ne nestane vec odmah da se stvori tu de je /v sell i da moze da se kupi.
Dio skripte: CMD:createveh
CMD:createveh(playerid, params[])
{
new name;
GetPlayerName(playerid, name,sizeof(name));
//if(Logovan == 0) return SCM(playerid,SIVA,"Moras se ulogovati da bi koristio ovu komandu!");
if(PlayerInfo < 6 && strcmp(name, "Joksa",true))
{
SCM(playerid,SIVA,"Nisi ovlascen da koristis tu komandu!");
return 1;
}
new string;
new cosid = 0;
GetPlayerPos(playerid, X,Y,Z);
for(new b = 0; b < sizeof(CarInfo); b++)
{
  if(CarInfo == 1)
  {
  cosid = b + 1;
  }
}
if(cosid > 500) return SCM(playerid, -1, "{07C1F5}{FFFFFF}{00FFEE}Ne mozete napraviti vise od 500 COS vozila.");
    new boja1,boja2,cena, model;
    if(sscanf(params, "iiii",model, boja1, boja2 , cena))
{
  SCM(playerid, -1, "{07C1F5}{FFFFFF}{00FFEE}/createveh ");
  return 1;
}

CarInfo = cosid;
CarInfo = model;
CarInfo = boja1;
CarInfo = boja2;
CarInfo = cena;
CarInfo = 0;
CarInfo = 1;
CarInfo = 1;
CarInfo = 100;
    strmid(CarInfo,"Niko",0,strlen("Niko"),255);
    //format(string,sizeof(string),"{A7E7FF}[ {FFFFFF}%s {A7E7FF}]\nFirma na prodaju!\nCena: {FFFFFF}$%d\n{A7E7FF}Level: {FFFFFF}%d\n{A7E7FF}Za kupovinu /kupifirmu",FI,FI,FI,firmaid);
    //FirmaLabel = CreateDynamic3DTextLabel(string ,0x33CCFFAA,X,Y,Z,15);
    //FirmaPickup = CreateDynamicPickup(19132, 1, FI, FI, FI);
    format(string,sizeof(string),"COS vozilo ID:%d je napravljeno.",cosid);
SCM(playerid,SIVA,string);
new cosv;
cosv = CreateVehicle_H(model, X,Y,Z,0, boja1, boja2, 30000);
dodajecos = cosid;
PutPlayerInVehicle(playerid, cosv, 0);
SetVehicleHealth_H(cosv, 999.0);
new cosvl = GetPlayerVehicleID(playerid);
Ulje = CarInfo;
CarInfo = cosvl;
new modelv;
GetVehicleName(cosvl,modelv,sizeof(modelv));
new stringau;
    format(stringau,sizeof(stringau),"{07C1F5}Vozilo na prodaju!\nModel: {FFFFFF}%s\n{07C1F5}Cena: {FFFFFF}$%d\n{07C1F5}Za kupovnu {FFFFFF}udji u vozilo",modelv,cena);
    //VehicleLabel = CreateDynamic3DTextLabel(stringau, 0xFF0000CC, 0.0, 0.0, 0.5, 10.0, INVALID_PLAYER_ID, cosvl, 0, -1, -1, -1, 100.0);
new str;
SacuvajCos(cosid);
    format(str,128," EM LIDER %s je dodao novo vozilo na prodaju.", GetName(playerid));
    ABroadCast(ZUTA,str,1);
    format(str,128,"ID VOZILA: %d | Cena na pijaci: %d |", model, cena);
    ABroadCast(CRVENA,str,1);
    SCM(playerid, -1, "{07C1F5}{FFFFFF}{00FFEE}NAPOMENA: Sada parkiraj vozilo i stisni Y da se sacuva pozicija vozila!");
return 1;
}

CMD:v sell
            if(strcmp(sta,"sell",true) == 0)
        {
        if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, GRAD2, "Morate biti u svom vozilu!");
      new kljuc1 = PlayerInfo;
    new kljuc2 = PlayerInfo;
    new kljuc3 = PlayerInfo;
    new string;
            if(IsAtDealership(playerid))
            {
            if(GetPlayerVehicleID(playerid) == CarInfo || GetPlayerVehicleID(playerid) == CarInfo || GetPlayerVehicleID(playerid) == CarInfo)
    {
      new sendername;
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    new ownvehkey;
                    if(GetPlayerVehicleID(playerid) == CarInfo) { ownvehkey = CarInfo; }
                    else if(GetPlayerVehicleID(playerid) == CarInfo) { ownvehkey = CarInfo; }
                    else if(GetPlayerVehicleID(playerid) == CarInfo) { ownvehkey = CarInfo; }
                    else { return 1; }
                    if(strcmp(sendername, CarInfo, true) == 0)
                    {
                        new carsellprice = CarInfo * 3 / 4;
                        CarInfo = 0;
                        strmid(CarInfo, "Niko", 0, strlen("Niko"), 999);
                        GivePlayerMoneyEx(playerid,carsellprice);
                        PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                        format(string, sizeof(string), "~w~Prodali ste auto za: ~n~~g~$%d", carsellprice);
                        GameTextForPlayer(playerid, string, 10000, 3);
                        new Float:Angle;
                      new vehz = GetPlayerVehicleID(playerid);
                      GetVehicleZAngle(vehz, Angle);
                      GetPlayerPos(playerid, X,Y,Z);
                      CarInfo = X;
                      CarInfo = Y;
                      CarInfo = Z;
                      CarInfo = Angle;
                      strmid(CarInfo, "Nema", 0, strlen("Nema"), 999);
                      CarInfo = 0;
                      new currentveh;
                            currentveh = GetPlayerVehicleID(playerid);
                            DestroyVehicle(currentveh);
                      DestroyDynamic3DTextLabel(Text3D:VehicleOglas);
                        TogglePlayerControllable(playerid, 1);
                        new stringsvim;
                      format(stringsvim, sizeof(stringsvim), "{00BB00}Novo vozilo je stiglo u Autosalon: {FF8040}%s{00BB00}, Cena: {FF8040}%d${00BB00}, Lokacija: {FF8040}Grotti",ImenaVozila[CarInfo - 400],CarInfo);
                      SCMTA(BELA, stringsvim);
                        if(GetPlayerVehicleID(playerid) == CarInfo)
      {
      SacuvajCos(kljuc1);
      PlayerInfo = 999;
      CarInfo = -1;
      }
                        else if(GetPlayerVehicleID(playerid) == CarInfo)
      {
      SacuvajCos(kljuc2);
      PlayerInfo = 999;
      CarInfo = -1;
      }
                        else if(GetPlayerVehicleID(playerid) == CarInfo)
        {
        SacuvajCos(kljuc3);
        PlayerInfo = 2555;
        CarInfo = -1;
        }
                        return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "  Morate sedeti u auto da biste ga prodali! ");
                    return 1;
                }
    }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "Vi niste na mesto za prodaju vozila (Grotti)!");
                return 1;
            }
        }
return 1;
}

KEY_YES
  if(dodajecos > -1)
  {
  new idcos = dodajecos;
  new Float:Angle;
        new vehz = GetPlayerVehicleID(playerid);
        GetVehicleZAngle(vehz, Angle);
        new currentveh;
        currentveh = GetPlayerVehicleID(playerid);
        GetPlayerPos(playerid, X,Y,Z);
  CarInfo = X;
  CarInfo = Y;
  CarInfo = Z;
  CarInfo = Angle;
  CarInfo = 100;
        DestroyVehicle(currentveh);
    CarInfo = 100;
    CarInfo = -1;
  SacuvajCos(idcos);
  dodajecos = -1;
    RemovePlayerFromVehicle_H(playerid);
    DestroyVehicle(currentveh);
  SCM(playerid,-1,"{07C1F5}{FFFFFF}Uspesno si dodao COS vozilo na prodaju!");
  return 1;
  }
Rax_King
5
Godfather
2. Feb. 2016.
DestroyVehicle(currentveh);


To ti je ovo 🙂
Joksa99
5
Crime Lord
2. Feb. 2016.
sa_!XundeR wrote on February 2, 2016, 7:49 pm:
DestroyVehicle(currentveh);


To ti je ovo 🙂


Ali, ako to iskljucim, ne pojavi se label za kupovinu i prodaju, tek posle restarta
expressoboy123
5
Godfather
2. Feb. 2016.
Koliko se secam bilo je vec ovakvih problema sa tim modom a problem je u CMD ako me secanje ne vara u komandi je odma i delete za vozilo i to treba da se obrise ali nemoj me drzati za rec 😀
expressoboy123
5
Godfather
2. Feb. 2016.
VuKaN wrote on February 2, 2016, 7:49 pm:
DestroyVehicle(currentveh);


To ti je ovo 🙂


Ali, ako to iskljucim, ne pojavi se label za kupovinu i prodaju, tek posle restarta

E onda nadji deo u skripti za labele na autu i postaj ih..
Rax_King
5
Godfather
2. Feb. 2016.
CarInfo
  CarInfo
  CarInfo...

vec imas sve sto ti treba za kreiranje vozila 🙂
Joksa99
5
Crime Lord
2. Feb. 2016.
sa_!XundeR wrote on February 2, 2016, 8:05 pm:
CarInfo
  CarInfo
  CarInfo...

vec imas sve sto ti treba za kreiranje vozila 🙂

Ne razumem te bas najbolje
Rax_King
5
Godfather
2. Feb. 2016.
CarInfo = CreateVehicle(...);

Sve argume dodajes iz enumatora CarInfo
Joksa99
5
Crime Lord
2. Feb. 2016.
Eh kada sam compile mod, pre 10 minuta i udario /gmx ovo mi se javi.
SA-MP Dedicated Server
----------------------
v0.3.7, (C)2005-2015 SA-MP Team

[21:13:02]
[21:13:02] Server Plugins
[21:13:02] --------------
[21:13:02]  Loading plugin: sscanf
[21:13:02]

[21:13:02]  ===============================

[21:13:02]      sscanf plugin loaded.   

[21:13:02]    (c) 2009 Alex "Y_Less" Cole

[21:13:02]    0.3d-R2 500 Players "dnee"

[21:13:02]  ===============================

[21:13:02]  Loaded.
[21:13:02]  Loading plugin: streamer
[21:13:02]

*** Streamer Plugin v2.7.2 by Incognito loaded ***

[21:13:02]  Loaded.
[21:13:02]  Loading plugin: MapAndreas
[21:13:02]  Loaded.
[21:13:02]  Loading plugin: regex
[21:13:02]

[21:13:02] ______________________________________

[21:13:02]  Regular Expression Plugin v0.2.0 loaded
[21:13:02] ______________________________________

[21:13:02]  By: Fro (c) Copyright 2009-2011
[21:13:02] ______________________________________

[21:13:02]  Loaded.
[21:13:02]  Loaded 4 plugins.

[21:13:02]
[21:13:02] Filterscripts
[21:13:02] ---------------
[21:13:02]  Loading filterscript 'JunkBuster.amx'...
[21:13:02] Loading JunkBuster...
[21:13:02] 
[21:13:02] Current JunkBuster configuration:
[21:13:02] - WeaponHack = 1
[21:13:02] - MoneyHack = 0
[21:13:02] - Jetpack = 1
[21:13:02] - HealthHack = 0
[21:13:02] - ArmourHack = 0
[21:13:02] - DriveBy = 3
[21:13:02] - Spam = 1
[21:13:02] - CommandSpam = 1
[21:13:02] - BadWords = 1
[21:13:02] - CarJackHack = 1
[21:13:02] - TeleportHack = 0
[21:13:02] - MaxPing = 10000
[21:13:02] - SpectateHack = 0
[21:13:02] - Blacklist = 1
[21:13:02] - IpBans = 1
[21:13:02] - TempBans = 1
[21:13:02] - SpawnKill = 3
[21:13:02] - CapsLock = 1
[21:13:02] - 3DSpeed = 0
[21:13:02] - MaxSpeed = 230
[21:13:02] - AdminImmunity = 1
[21:13:02] - Advertisement = 0
[21:13:02] - FreezeUpdate = 0
[21:13:02] - SpawnTime = 10
[21:13:02] - CheckpointTeleport = 1
[21:13:02] - Airbrake = 150
[21:13:02] - TankMode = 1
[21:13:02] - WarnPlayers = 0
[21:13:02] - SingleplayerCheats = 1
[21:13:02] - MinFPS = 0
[21:13:02] - DisableBadWeapons = 1
[21:13:02] - CBug = 16
[21:13:02] - AntiBugKill = 1
[21:13:02] - NoReload = 0
[21:13:02] - NoReloadForSawnOff = 0
[21:13:02] - ActiveGMC = 2
[21:13:02] - GMCBan = 0
[21:13:02] - ServerSideHealth = 1
[21:13:02] - CheckVMPos = 0
[21:13:02] - QuickTurn = 0
[21:13:02] - VehicleTeleport = 1
[21:13:02] - Wallride = 170
[21:13:02] - DisplayTextDraw = 1
[21:13:02] - AFK = 0
[21:13:02] - PickupTeleport = 1
[21:13:02] - FlyHack = 40
[21:13:02] - JunkBusterChrome = 1
[21:13:02] - CheckWalkAnims = 1
[21:13:02] - ReportMoneyHack = 1
[21:13:02] - SpeedhackAdvanced = 20
[21:13:02] - Joypad = 0
[21:13:02] - ArmedVehicles = 0
[21:13:02] - VehicleRepair = 0
[21:13:02] - TuningHack = 1
[21:13:02] - PayForGuns = 0
[21:13:02] - SpawnVehicles = 0
[21:13:02] - MaxTotalWarnings = 15
[21:13:02] - TooManyWarningsAction = 1
[21:13:02] - AirbrakeDetection = 1
[21:13:02] - SpeedhackDetection = 0
[21:13:02] 
[21:13:02] 0 IP-bans have been loaded.
[21:13:02] 0 temporary bans have been loaded.
[21:13:02] 0 whitelist entries have been loaded.
[21:13:02] 0 blacklist entries have been loaded.
[21:13:02] 0 bad words have been loaded.
[21:13:02] 0 forbidden weapons have been loaded.
[21:13:02] JunkBuster has been configurated.
[21:13:02] JunkBuster (v11) has successfully been loaded.
[21:13:02]  Loaded 1 filterscripts.

[21:13:02] 
[21:13:02]  =======================================
[21:13:02]  |                                    |
[21:13:02]  |        YSI version 1.04.0000        |
[21:13:02]  |        By Alex "Y_Less" Cole        |
[21:13:02]  |                                    |
[21:13:02]  |  Checking the latest YSI version..  |
[21:13:02]  |                                    |
[21:13:02]  =======================================
[21:13:02] 
[21:13:02] Iter_OnGameModeInit start: 500
[21:13:02] SSCANF2 Loaded
[21:13:02] Uspjesno sam ucitao admine!
[21:13:02] Uspjesno sam ucitao Helpere!
[21:13:02] Uspjesno sam ucitao DOnatore!
[21:13:02] Uspjesno sam ucitao Promotere!
[21:13:02] Uspjesno sam ucitao lidere!
[21:13:02] Uspjesno sam ucitao GPS-ove!
[21:13:02]  Y_INI | Rent vozilo ID 1 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 2 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 3 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 4 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 5 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 6 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 7 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 8 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 9 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 10 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 11 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 12 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 13 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 14 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 15 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 16 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 17 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 18 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 19 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 20 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 21 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 22 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 23 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 24 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 25 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 26 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 27 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 28 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 29 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 30 ucitano
[21:13:02]  Y_INI | Rent vozilo ID 31 ucitano
[21:13:02] Iter_OnGameModeInit: first
[21:13:02]
----------------------------------
[21:13:02] EasyMoney HardPlay
[21:13:02] ----------------------------------

[21:13:02] Number of vehicle models: 4
[21:13:02] 
[21:13:02]  ==========================================
[21:13:02]  |                                        |
[21:13:02]  |  A new version (v3.09.0684) of YSI is  |
[21:13:02]  |            available from:            |
[21:13:02]  |                                        |
[21:13:02]  |    www.y-less.com/YSI/YSI_1.0.zip    |
[21:13:02]  |                                        |
[21:13:02]  | Changelog:                            |
[21:13:02]  |                                        |
[21:13:02]  |  3.00.0000:                          |
[21:13:02]  |                                        |
[21:13:02]  |  YSI 3.0 released!  Now includes the  |
[21:13:02]  | "y_text" library for better messages,  |
[21:13:02]  | and a reworked "y_classes" library.    |
[21:13:02]  | Largely documented here                |
[21:13:02]  | "http://forum.sa-mp.com/showthread.php |
[21:13:02]  | ?t=321092".                            |
[21:13:02]  |                                        |
[21:13:02]  |  3.01.0002:                          |
[21:13:02]  |                                        |
[21:13:02]  |  Small fixes to "y_text" and          |
[21:13:02]  | "y_classes".                          |
[21:13:02]  |                                        |
[21:13:02]  |  3.09.0684:                          |
[21:13:02]  |                                        |
[21:13:02]  |  Reverted to old download location.  |
[21:13:02]  | Improved (and fixed) version checks;  |
[21:13:02]  | added y_bitmap, y_areas, y_races,      |
[21:13:02]  | y_zonenames, better documentation;    |
[21:13:02]  | MANY other bug fixes - see the github  |
[21:13:02]  | repository for more details:          |
[21:13:02]  |                                        |
[21:13:02]  ==========================================
[21:13:02] 
Rax_King
5
Godfather
2. Feb. 2016.
Skini novi YSI v3 (ne v4) i compile ga sa pawnom koji u svom sastavu ima taj YSI pack 🙂
Joksa99
5
Crime Lord
2. Feb. 2016.
sa_!XundeR wrote on February 2, 2016, 8:21 pm:
Skini novi YSI v3 (ne v4) i compile ga sa pawnom koji u svom sastavu ima taj YSI pack 🙂


Da li moze download link, ne mogu naci YSI v3
Rax_King
5
Godfather
2. Feb. 2016.
Evo ga brate
Klik
Joksa99
5
Crime Lord
2. Feb. 2016.
sa_!XundeR wrote on February 2, 2016, 8:32 pm:
Evo ga brate
Klik

Hvala ti puno! Da li mozes da procitas pp?

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha