[POMOC] Kako dodati aute u.....

Započeo Matrix_Green
26. Apr. 2011.
951
pregleda
5
postova
sandman12wolf
4
Enforcer
26. Apr. 2011.
Skripta koju koristim:GTA:RP
Detaljan opis problema:Evo ovako zanima me kako da dodam aute u dialog koji sam napravio,misli man aute iz owner shipa da ja njih mogu kupiti parkirati i da mi se sejvaju.
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Viky
6
Legenda Foruma
26. Apr. 2011.
Na temelju cega da ti pomognemo?

Npr, daj nam neke komande sto se ticu toga i slicno...
sandman12wolf
4
Enforcer
26. Apr. 2011.
BloodMaster.amx wrote on April 26, 2011, 11:35 am:
Na temelju cega da ti pomognemo?

Npr, daj nam neke komande sto se ticu toga i slicno...


evo ovako ovo je komanda koja se ukuca da se vidi u dialog
f(strcmp(cmdtext, "/v buy", true) == 0)
{
    if(IsPlayerInRangeOfPoint(playerid, 1, 1219.3896,-1811.8639,16.593😎)
    {
            ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Auto Shop", "Infernus", "Kupi", "Odustani");
        }
        return 1;
    }

e a sada me zaniam kako da ja dodam auto
da se moze kupiti i da bude iz owner shipa
Viky
6
Legenda Foruma
26. Apr. 2011.
Jel imas staru komandu /v buy? Ako imas daj...

U glavnom, moras koristiti: http://wiki.sa-mp.com/wiki/OnDialogResponse
sandman12wolf
4
Enforcer
26. Apr. 2011.
BloodMaster.amx wrote on April 26, 2011, 11:45 am:
Jel imas staru komandu /v buy? Ako imas daj...

U glavnom, moras koristiti: http://wiki.sa-mp.com/wiki/OnDialogResponse

if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vehicle", true) == 0) // By Ellis
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "  You need to login first ! ");
            return 1;
        }
        new x_nr;
        x_nr = strtok(cmdtext, idx);
        if(!strlen(x_nr))
        {
            SendClientMessage(playerid, COLOR_RED," ");
            SendClientMessage(playerid, COLOR_RED, "|---------------------------------------------------------------------|");
            SendClientMessage(playerid, COLOR_GREY, "                    (/v)ehicle                                 ");
            SendClientMessage(playerid, COLOR_WHITE, "        park  lock(1-3)  sell  sellto  color  list              ");
            SendClientMessage(playerid, COLOR_RED, "|---------------------------------------------------------------------|");
            return 1;
        }
        if(strcmp(x_nr,"sell",true) == 0)
        {
            if(IsAtDealership(playerid))
            {
                if(GetPlayerVehicleID(playerid) == PlayerInfo || GetPlayerVehicleID(playerid) == PlayerInfo || GetPlayerVehicleID(playerid) == PlayerInfo)
                {
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    new ownvehkey;
                    if(GetPlayerVehicleID(playerid) == PlayerInfo) { ownvehkey = PlayerInfo; }
                    else if(GetPlayerVehicleID(playerid) == PlayerInfo) { ownvehkey = PlayerInfo; }
                    else if(GetPlayerVehicleID(playerid) == PlayerInfo) { ownvehkey = PlayerInfo; }
                    else { return 1; }
                    if(strcmp(sendername, CarInfo, true) == 0)
                    {
                        new carsellprice = CarInfo / 4 * 3;
                        new Float:x,Float:y,Float:z;
                        new Float:a;
                        CarInfo = 0;
                        strmid(CarInfo, "Dealership", 0, strlen("Dealership"), 999);
                        SafeGivePlayerMoney(playerid,carsellprice);
                        PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                        format(string, sizeof(string), "~w~You have sold your car for: ~n~~g~$%d", carsellprice);
                        GameTextForPlayer(playerid, string, 10000, 3);
                        GetVehiclePos(ownvehkey, x, y, z);
                        GetVehicleZAngle(ownvehkey, a);
                        CarInfo = x;
                        CarInfo = y;
                        CarInfo = z;
                        CarInfo = a;
                        if(GetPlayerVehicleID(playerid) == PlayerInfo) { PlayerInfo = 999; }
                        else if(GetPlayerVehicleID(playerid) == PlayerInfo) { PlayerInfo = 999; }
                        else if(GetPlayerVehicleID(playerid) == PlayerInfo) { PlayerInfo = 999; }
                        RemovePlayerFromVehicle(playerid);
                        TogglePlayerControllable(playerid, 1);
                        if(PlayerInfo == ownvehkey)
                        {
                            SetPlayerInterior(playerid,0);
                            SetPlayerPos(playerid,CarInfo,CarInfo,CarInfo);
                            PlayerInfo = 0;
                        }
                        OnPropUpdate();
                        OnPlayerUpdate(playerid);
                        DestroyVehicle(ownvehkey);
CreateVehicle(CarInfo,CarInfo,CarInfo,CarInfo+1.0,CarInfo,CarInfo,CarInfo,60000);
                        return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "  You have to sit at your own car to sell it! ");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "You are not at a dealership");
                return 1;
            }
        }
        else if(strcmp(x_nr,"sellto",true) == 0)
        {
if(GetPlayerVehicleID(playerid) == PlayerInfo || GetPlayerVehicleID(playerid) == PlayerInfo || GetPlayerVehicleID(playerid) == PlayerInfo)
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new ownvehkey;
                if(GetPlayerVehicleID(playerid) == PlayerInfo) { ownvehkey = PlayerInfo; }
                else if(GetPlayerVehicleID(playerid) == PlayerInfo) { ownvehkey = PlayerInfo; }
                else if(GetPlayerVehicleID(playerid) == PlayerInfo) { ownvehkey = PlayerInfo; }
        else { return 1; }
    if(strcmp(sendername, CarInfo, true) == 0)
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
    SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] ");
    return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
    if(ProxDetectorS(8.0, playerid, giveplayerid))
      {
    if(PlayerInfo == 999)
    {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] ");
                return 1;
            }
            new price;
            price = strval(tmp);
            if(price < 1 || price > 1500000)
            {
                SendClientMessage(playerid, COLOR_GREY, "  Price not lower then 1 and not higher then 1500000. ");
                return 1;
            }
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
      format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price);
        SendClientMessage(playerid, COLOR_WHITE, string);
        format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price);
        SendClientMessage(giveplayerid, COLOR_WHITE, string);
        OwnableCarOffer = playerid;
        OwnableCarID = ownvehkey;
        OwnableCarPrice = price;
        return 1;
        }
        else if(PlayerInfo == 999)
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] ");
                return 1;
            }
            new price;
            price = strval(tmp);
            if(price < 1 || price > 1500000)
            {
                SendClientMessage(playerid, COLOR_GREY, "  Price not lower then 1 and not higher then 1500000. ");
                return 1;
            }
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
      format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price);
        SendClientMessage(playerid, COLOR_WHITE, string);
        format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price);
        SendClientMessage(giveplayerid, COLOR_WHITE, string);
        OwnableCarOffer = playerid;
        OwnableCarID = ownvehkey;
        OwnableCarPrice = price;
        return 1;
        }
        else if(PlayerInfo == 999)
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] ");
                return 1;
            }
            new price;
            price = strval(tmp);
            if(price < 1 || price > 1500000)
            {
                SendClientMessage(playerid, COLOR_GREY, "  Price not lower then 1 and not higher then 1500000. ");
                return 1;
            }
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
      format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price);
        SendClientMessage(playerid, COLOR_WHITE, string);
        format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price);
        SendClientMessage(giveplayerid, COLOR_WHITE, string);
        OwnableCarOffer = playerid;
        OwnableCarID = ownvehkey;
        OwnableCarPrice = price;
        return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "  Player has 3 cars already ! ");
            return 1;
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "  Player is not near you ! ");
        return 1;
    }
}
}
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "  This is not your car");
        return 1;
    }
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "  You have to sit at your own car to sell it");
    return 1;
}
        }
        else if(strcmp(x_nr,"park",true) == 0)
        {
            new Float:x,Float:y,Float:z;
new Float:a;
new carid;
new getcarid;
if(GetPlayerVehicleID(playerid) == PlayerInfo) { carid = PlayerInfo; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo) { carid = PlayerInfo; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo) { carid = PlayerInfo; }
else { return 1; }
getcarid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
//GetPlayerFacingAngle(playerid, a);
GetVehicleZAngle(carid, a);
if(IsPlayerInVehicle(playerid,carid) && CarInfo == 1)
{
  if(PlayerInfo == 999 && PlayerInfo == 999 & PlayerInfo)
{
SendClientMessage(playerid, COLOR_GREY, "You don't own a car.");
return 1;
}
if(getcarid == carid)
{
CarInfo = x;
CarInfo = y;
CarInfo = z;
CarInfo = a;
format(string, sizeof(string), "~n~ You have parked your vehicle in this location. ~n~");
GameTextForPlayer(playerid, "You have parked your vehicle in this position. It will respawn here.", 10000, 3);
OnPropUpdate();
OnPlayerUpdate(playerid);
DestroyVehicle(carid);
CreateVehicle(CarInfo,CarInfo,CarInfo,CarInfo+1.0,CarInfo,CarInfo,CarInfo,60000);
TogglePlayerControllable(playerid, 1);
return 1;
  }
}
        }
        else if(strcmp(x_nr,"lock1",true) == 0)
        {
                new keycar = PlayerInfo;
                if(keycar != 999)
                {
                    new locked;
                    locked = strtok(cmdtext, idx);
                    if(CarInfo == 1)
                    {
                    for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,0);
}
}
format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo = 0;
OnPropUpdate();
return 1;
}
else if(CarInfo == 0)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
SetVehicleParamsForPlayer(keycar,i,0,1);
}
}
format(string, sizeof(string), "~w~Vehicle~n~~r~Locked");
GameTextForPlayer(playerid, string, 4000, 3);
CarInfo = 1;
OnPropUpdate();
return 1;
}

to mi je cjela komanda od /v

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha