[Pomoc] COS

Započeo xXxPored, Novembar 23, 2012, 16:22:34 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: moja
Detaljan opis problema: CO ship...Kad hocu da kupim auto kaze mi "Vec imas auto!" :/
Dio skripte: recite sta treba!
Neke slike/video za lakse dobivanje pomoci(neobavezno):
big respect 4 Blaeks Vuzimir  Shoorty Scripter HamZa

To sigurno nije tvoja skripta 100 % sam siguran da je CLRP.. a na CLRP nije dovršen CoS Sistem

Evo ti jedan dobar OwnerShip ubaci ga na mod , a sa CLRP-a ukini bar sam to ja radio..

http://balkan-samp.com/forum/index.php?topic=41319.0

MOj je mod raden od nule a COS sam uzeo od NOxicusa izvadio i ubacio :)
big respect 4 Blaeks Vuzimir  Shoorty Scripter HamZa

Prelistaj komandu /v buy i kljuceve ,moze biti do 100 stvari

Evo komanda V buy :)

if(strcmp(cmd, "/kupivozilo", true) == 0)
{
new stringr[128];
new sendernamer[MAX_PLAYER_NAME];
      if (Spectating[playerid][0]!=-1)
    {
        if (Carlist[playerid][Typ]==-1)
        {
            new price = Buylist[Spectating[playerid][0]][Price];
            if (price <= GetPlayerMoney(playerid))
            {
new autohaus=Buylist[Spectating[playerid][0]][Autohaus];
            GivePlayerMoney(playerid, - price);
Carlist[playerid][Cijena] = Buylist[Spectating[playerid][0]][Price];
PlayerInfo[playerid][pVoziloSpawnano] = 0;
            Carlist[playerid][Typ]=Spectating[playerid][0]; Carlist[playerid][aX]=Carspawns[autohaus][aX]; Carlist[playerid][aY]=Carspawns[autohaus][aY];
Carlist[playerid][aZ]=Carspawns[autohaus][aZ]; Carlist[playerid][aRotation]=Carspawns[autohaus][aRotation]; Carlist[playerid][Status]=1; Carlist[playerid][Lock]=0;
Carlist[playerid][Typ] = 1;
new otext[20];
if(PlayerInfo[playerid][pOvjeraPapira] == 0) { otext = "Nema"; }
strmid(Carlist[playerid][BrojRegistracije],otext, 0, strlen(otext), 255);
SetVehicleNumberPlate(Carlist[playerid][Carid], Carlist[playerid][BrojRegistracije]);
//-------------
new string1[128];
GetPlayerName(playerid, sendernamer, sizeof(sendernamer));
format(string1, sizeof(string1), "%s",sendernamer);
strmid(Carlist[playerid][Vlasnik], string1, 0, strlen(string1), 255);

//-------------
new Vozilo;
Vozilo = GetVehicleModel(Buylist[Spectating[playerid][0]][Carid]);
Carlist[playerid][VehModel] = Vozilo;
Carlist[playerid][Cijena] = Buylist[Spectating[playerid][0]][Price];
        TogglePlayerControllable(playerid,1);
TextDrawHideForPlayer(playerid, imevozila[playerid]);
TextDrawHideForPlayer(playerid, cijenavozila[playerid]);
TextDrawHideForPlayer(playerid, registracijavozila[playerid]);
VehicleSave(playerid);
        Spectating[playerid][0]=-1;
        RemovePlayerFromVehicle(playerid);
format(stringr,128,"Cestitamo! Kupio si novo vozilo za za %i$!",price);
SendClientMessage(playerid, 0x8888C4FF, stringr);
SendClientMessage(playerid, 0x9191C8FF, "Ako ti se vozilo unisti kucaj /v popravi da ga popravis.");
SendClientMessage(playerid, 0x9B9BCDFF, "Vozila nestaju kada se diskonektujete sa servera.");
SendClientMessage(playerid, 0xA2A2D0FF, "Vracaju se nakon sto se vi konektujete.");
SendClientMessage(playerid, 0xAEAED6FF, "Ostalo: (/v)ozilo.");
SendClientMessage(playerid, 0xB9B9DBFF, "Kucaj /v spawn da spawnas vozilo, samo pazi da nema objekata u blizini.");
SendClientMessage(playerid, 0xC0C0DEFF, "Cuvaj ovo vozilo, i naravno puno srece sa njim!");
}
                else { format(stringr, 128, "Nemas dovoljno novca! ($%i)!", price); SendClientMessage(playerid, COLOR_LIGHTRED, string); }
}
else { SendClientMessage(playerid, COLOR_GREY, "Vec imas vozilo"); }
    }
    else { SendClientMessage(playerid, COLOR_GREY, "Nisi u izlozbenom vozilu!"); }
    return 1;
}


A to za kljuceve u NoX ne postoji koliko znam
big respect 4 Blaeks Vuzimir  Shoorty Scripter HamZa

if(strcmp(cmd, "/vprihvati", true) == 0)
{
new string[128];
    if (offerCar[playerid][0]!=-1)
    {
        if (IsPlayerConnected(offerCar[playerid][0]))
        {
            if (Carlist[playerid][Typ]==-1)
            {
                if (Carlist[offerCar[playerid][0]][Typ]!=-1)
                {
                    if (GetPlayerCash(playerid)>=offerCar[playerid][1])
                    {
                        new sellerid=offerCar[playerid][0];
                        new price=offerCar[playerid][1];
                        offerCar[playerid]={-1,0};
                    GivePlayerCash(playerid, - price);
                    GivePlayerCash(sellerid, price);
                    Carlist[playerid][Typ]=Carlist[sellerid][Typ];
                    Carlist[playerid][aX]=Carlist[sellerid][aX];
                    Carlist[playerid][aY]=Carlist[sellerid][aY];
        Carlist[playerid][aZ]=Carlist[sellerid][aZ];
        Carlist[playerid][aRotation]=Carlist[sellerid][aRotation];
        Carlist[playerid][Status]=Carlist[sellerid][Status];
        Carlist[playerid][Lock]=Carlist[sellerid][Lock];
        Carlist[playerid][Carid]=Carlist[sellerid][Carid];
                Carlist[playerid][Color1]=Carlist[sellerid][Color1];
                Carlist[playerid][Color2]=Carlist[sellerid][Color2];
                Carlist[playerid][mod1]=Carlist[sellerid][mod1];
                Carlist[playerid][mod2]=Carlist[sellerid][mod2];
                Carlist[playerid][mod3]=Carlist[sellerid][mod3];
                Carlist[playerid][mod4]=Carlist[sellerid][mod4];
                Carlist[playerid][mod5]=Carlist[sellerid][mod5];
                Carlist[playerid][mod6]=Carlist[sellerid][mod6];
                Carlist[playerid][mod7]=Carlist[sellerid][mod7];
                Carlist[playerid][mod8]=Carlist[sellerid][mod8];
                Carlist[playerid][mod9]=Carlist[sellerid][mod9];
                Carlist[playerid][mod10]=Carlist[sellerid][mod10];
                Carlist[playerid][mod11]=Carlist[sellerid][mod11];
                Carlist[playerid][mod12]=Carlist[sellerid][mod12];
                Carlist[playerid][mod13]=Carlist[sellerid][mod13];
                Carlist[playerid][mod14]=Carlist[sellerid][mod14];
                Carlist[playerid][mod15]=Carlist[sellerid][mod15];
                Carlist[playerid][mod16]=Carlist[sellerid][mod16];
                Carlist[playerid][mod17]=Carlist[sellerid][mod17];
                Carlist[playerid][Paintjob]=Carlist[sellerid][Paintjob];
                Carlist[sellerid][Typ]=-1; Carlist[sellerid][aX]=0.0; Carlist[sellerid][aY]=0.0; Carlist[sellerid][aZ]=0.0;
                Carlist[sellerid][aRotation]=0.0; Carlist[sellerid][Status]=0; Carlist[sellerid][Lock]=0; Carlist[sellerid][Carid]=-1;
                Carlist[sellerid][Color1]=-1; Carlist[sellerid][Color2]=-1; Carlist[sellerid][mod1]=-1; Carlist[sellerid][mod2]=-1;
                Carlist[sellerid][mod3]=-1; Carlist[sellerid][mod4]=-1; Carlist[sellerid][mod5]=-1; Carlist[sellerid][mod6]=-1;
                Carlist[sellerid][mod7]=-1; Carlist[sellerid][mod8]=-1; Carlist[sellerid][mod9]=-1; Carlist[sellerid][mod10]=-1;
                Carlist[sellerid][mod11]=-1; Carlist[sellerid][mod12]=-1; Carlist[sellerid][mod13]=-1; Carlist[sellerid][mod14]=-1;
                Carlist[sellerid][mod15]=-1; Carlist[sellerid][mod16]=-1; Carlist[sellerid][mod17]=-1; Carlist[sellerid][Paintjob]=-1;
PlayerInfo[playerid][pVoziloSpawnano] = 0;
        if (Carlist[playerid][Status]==1)
        {
                    SetVehicleParamsForAll(Carlist[playerid][Carid],0,Carlist[playerid][Lock]);
                    SetVehicleParamsForPlayer(Carlist[playerid][Carid],playerid,0,0);
                }
VehicleSave(playerid);
                            format(string,128,"Cestitamo! Kupio si $%s za %i!",Buylist[Carlist[playerid][Typ]][Name],price);
SendClientMessage(playerid, COLOR_RACE, string);
SendClientMessage(playerid, COLOR_GREEN, "Ako ti se vozilo unisti kucaj /v popravi da ga popravis.");
SendClientMessage(playerid, COLOR_GREEN, "Vozila nestaju kada se diskonektujete sa servera.");
SendClientMessage(playerid, COLOR_GREEN, "Vracaju se nakon sto se vi konektujete.");
SendClientMessage(playerid, COLOR_GREEN, "Ostalo: (/v)ozilo.");
SendClientMessage(playerid, COLOR_GREEN, "Pisi /v prvakupnja da spawnas svoje vozilo!");
SendClientMessage(playerid, COLOR_GREEN, "Cuvaj ovo vozilo, i naravno puno srece sa njim!");
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
                format(string,128,"Prodao si igracu %s svoje vozilo za $%i!",playername, price);
                SendClientMessage(sellerid, COLOR_GREEN, string);
                    }
                    else
                    {
                        format(string, 128, "Nedovoljno novca! ( $%i)!", offerCar[playerid][1]);
                        SendClientMessage(playerid, COLOR_GREY, string);
                    }
                    }
                    else
                    {
                        offerCar[playerid]={-1,0};
                        SendClientMessage(playerid, COLOR_GREY, "Prodavac nema vozila!.");
                    }
            }
            else
            {
        SendClientMessage(playerid, COLOR_GREY, "Vec imas vozilo!");
            }
}
            else
            {
                offerCar[playerid]={-1,0};
                SendClientMessage(playerid, COLOR_GREY, "Prodavac je offline.");
            }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "Nema vozila ili ponude.");
    }
    return 1;
}
#endif
big respect 4 Blaeks Vuzimir  Shoorty Scripter HamZa