[pomoc] auta

Započeo Rabiosa, Oktobar 17, 2011, 14:51:30 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

mod: BU

problem: molim Vas pomozite mi ! Kada kupim bulleta i sada ga /v park stvori mi se infernus....i dalje je on moj i sve ali nije to taj tip auta koji sma kupio....molim Vas jos jednom da mi pomognete...

dio skripte: sta treba recite odma postam

slike ili video:/

Jos jednom Vas molim da mi pomognete bicu Vam puno zahvalan!
Respect to:
[BD]Gagi


evo komande:

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[playerid][pPcarkey]) { carid = PlayerInfo[playerid][pPcarkey]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid = PlayerInfo[playerid][pPcarkey2]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { carid = PlayerInfo[playerid][pPcarkey3]; }
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[carid][cOwned] == 1)
{
              new Float:health;
              GetVehicleHealth(GetPlayerVehicleID(playerid),health);
if(health >= 600)//gigicar
{
    if(PlayerInfo[playerid][pPcarkey] == 999 && PlayerInfo[playerid][pPcarkey2] == 999 & PlayerInfo[playerid][pPcarkey3])
{
SendClientMessage(playerid, COLOR_GREY, "Nemate auto.");
return 1;
}
if(getcarid == carid)
{
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
format(string, sizeof(string), "~n~ Parkirali ste vozilo na ovoj lokaciji. ~n~");
GameTextForPlayer(playerid, "Parkirali ste vozilo ovdje. Ovdje ce se respawnovati.", 10000, 3);
OnPropUpdate();
OnPlayerUpdateCustom(playerid);
DestroyVehicle(carid);
CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
TogglePlayerControllable(playerid, 1);
return 1;
    }
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"Ne mozete koristiti ovu komadnu jer vam je vozilo osteceno!");
SendClientMessage(playerid,COLOR_WHITE,"Prvo ga popravite kako bi ste ga mogli parkirati!");
}
}
        }
Respect to:
[BD]Gagi

dragan12

Pa on stvara po tome kako ovo cuva:

CarInfo[carid][cModel]


Mozda ti pogresno cuva
EDIT:
Ili probaj sa ovim da kreira po ID u vozilu koje je igrac on ce uzeti model vozila
GetVehicleModel(GetPlayerVehicleID(playerid)) to umesto CarInfo[carid][cModel]
Poslednja Izmena: Oktobar 17, 2011, 19:53:55 POSLE PODNE od [BD]Gagi

sada mi ne spawnuje auto uopste kada ga /v park ....
Respect to:
[BD]Gagi

dragan12

Sada sam primetio
Tebi je carid definisano samo gore new carid;
Znaci da onda on radi za ID kola 0 ako se nevaram. Stavis new carid = GetPlayerVehicleID(playerid); aj tako probaj

znaci umjesto CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);

stavim ovako

CreateVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)),CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);

i definisem na vrhu komande
new carid = GetPlayerVehicleID(playerid);

jel tako?

Respect to:
[BD]Gagi