[Pomoc] Nestaje mi veh

Započeo slasher, Jun 07, 2013, 22:16:56 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Skripta koju koristim: MG
Detaljan opis problema: Izmapao sam svoju garazu, podesio koord, radi sve lepo bez problema, ali kad kucam /parkirajauto, on me prebaci u tu garazu, i kad kucam /v park, pise da ce se od sad tu spawnovati, ali vozila nema u toj garazi, tako sam isto probao da odem do LV pa da uzmem jetpack da vidim slucajno da nisam prenisko napravio garazu ali nema ga ni gore, isto tako je kad ga /parkirajauto i tako ga ostavim, izadjem iz garaze, i opet udjem i veh-a opet nema :/
Dio skripte: /
Neke slike/video za lakse dobivanje pomoci(neobavezno):
http://zaslike.com/files/s711mtc36tax62lh6tv.png
http://zaslike.com/files/mdksc1vy86yecx02vl35.png
http://zaslike.com/files/fe493cokan9yy1t989i2.png


new vehicle = GetPlayerVehicle(playerid), Float:vx, Float:vy, Float:vz, Float:vangle, filestr[100];
GetVehiclePos(vehicle, vx, vy, vz);
GetVehicleZAngle(vehicle, vangle);
vehicle = Carlist[playerid][Carid];
vx = Carlist[playerid][X];
vy = Carlist[playerid][Y];
vz = Carlist[playerid][Z];
vangle = Carlist[playerid][Rotation];


public OnVehicleStreamIn(vehicleid, forplayerid)
{
    SetVehiclePos(Carlist[playerid][Carid], Carlist[playerid][X], Carlist[playerid][Y], Carlist[playerid][Z]);
    SetVehicleZAngle(Carlist[playerid][Carid], Carlist[playerid][Rotation]);
    return 1;
}



De jel mozes ovo malo pojasniti, blejim u ovo 7min i sve mi se pomesalo u glavi  :-[

Daj cijelu komadnu da vidim od /park
Poslednja Izmena: Jun 07, 2013, 22:42:43 POSLE PODNE od |OY:RP|PeMPaCâ„¢

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 if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey4]) { carid = PlayerInfo[playerid][pPcarkey4]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey5]) { carid = PlayerInfo[playerid][pPcarkey5]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey6]) { carid = PlayerInfo[playerid][pPcarkey6]; }
else { return 1; }
getcarid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
//GetPlayerFacingAngle(playerid, a);
GetVehicleZAngle(carid, a);
if(CarInfo[carid][cOwned] == 2)
{
SendClientMessage(playerid, COLOR_GREY, "Vozilo vlasnistvo parking servisa!");
return 1;
}
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]==999&& PlayerInfo[playerid][pPcarkey4]==999&& PlayerInfo[playerid][pPcarkey5]==999&& PlayerInfo[playerid][pPcarkey6]==999)
{
SendClientMessage(playerid, COLOR_GREY, "Nemate auto.");
return 1;
}
if(getcarid == carid)
{
if(PlayerToPoint(30.0, playerid,3404.3948,719.4877,74.6554))
{
new i=GetPlayerVirtualWorld(playerid);
Garaza[i][gAuto]=carid;
new result[800];
new mica[100];
SendClientMessage(playerid, COLOR_WHITE, "Izvadili ste auto!");
if(Garaza[i][gAuto]==0){mica="Prazna";}
else {mica="Puna";}
format(result,sizeof(result),"{fc864b}Vlasnik:{ffffff}%s\n{fc864b}Garaza:{ffffff}%s",Garaza[i][gVlasnik],mica);
UpdateDynamic3DTextLabelText(garazasale[i],0x00FF00FF,result);
}
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);
OnCarUpdate();
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!");
}
}
        }

Probaj sad
Jesi napravio enum Float
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 if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey4]) { carid = PlayerInfo[playerid][pPcarkey4]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey5]) { carid = PlayerInfo[playerid][pPcarkey5]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey6]) { carid = PlayerInfo[playerid][pPcarkey6]; }
else { return 1; }
getcarid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
//GetPlayerFacingAngle(playerid, a);
GetVehicleZAngle(carid, a);
if(CarInfo[carid][cOwned] == 2)
{
SendClientMessage(playerid, COLOR_GREY, "Vozilo vlasnistvo parking servisa!");
return 1;
}
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]==999&& PlayerInfo[playerid][pPcarkey4]==999&& PlayerInfo[playerid][pPcarkey5]==999&& PlayerInfo[playerid][pPcarkey6]==999)
{
SendClientMessage(playerid, COLOR_GREY, "Nemate auto.");
return 1;
}
if(getcarid == carid)
{
if(PlayerToPoint(30.0, playerid,3404.3948,719.4877,74.6554))
{
new i=GetPlayerVirtualWorld(playerid);
Garaza[i][gAuto]=carid;
new result[800];
new mica[100];
SendClientMessage(playerid, COLOR_WHITE, "Izvadili ste auto!");
if(Garaza[i][gAuto]==0){mica="Prazna";}
else {mica="Puna";}
format(result,sizeof(result),"{fc864b}Vlasnik:{ffffff}%s\n{fc864b}Garaza:{ffffff}%s",Garaza[i][gVlasnik],mica);
UpdateDynamic3DTextLabelText(garazasale[i],0x00FF00FF,result);
}
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);
OnCarUpdate();
OnPlayerUpdateCustom(playerid);
                                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!");
                                                return 1;
}
}
        }
Poslednja Izmena: Jun 07, 2013, 22:51:40 POSLE PODNE od |OY:RP|PeMPaCâ„¢

Citat: |OY:RP|PeMPaCâ,,¢ poslato Jun 07, 2013, 22:49:14 POSLE PODNE
Probaj sad
Jesi napravio enum Float
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 if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey4]) { carid = PlayerInfo[playerid][pPcarkey4]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey5]) { carid = PlayerInfo[playerid][pPcarkey5]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey6]) { carid = PlayerInfo[playerid][pPcarkey6]; }
else { return 1; }
getcarid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
//GetPlayerFacingAngle(playerid, a);
GetVehicleZAngle(carid, a);
if(CarInfo[carid][cOwned] == 2)
{
SendClientMessage(playerid, COLOR_GREY, "Vozilo vlasnistvo parking servisa!");
return 1;
}
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]==999&& PlayerInfo[playerid][pPcarkey4]==999&& PlayerInfo[playerid][pPcarkey5]==999&& PlayerInfo[playerid][pPcarkey6]==999)
{
SendClientMessage(playerid, COLOR_GREY, "Nemate auto.");
return 1;
}
if(getcarid == carid)
{
if(PlayerToPoint(30.0, playerid,3404.3948,719.4877,74.6554))
{
new i=GetPlayerVirtualWorld(playerid);
Garaza[i][gAuto]=carid;
new result[800];
new mica[100];
SendClientMessage(playerid, COLOR_WHITE, "Izvadili ste auto!");
if(Garaza[i][gAuto]==0){mica="Prazna";}
else {mica="Puna";}
format(result,sizeof(result),"{fc864b}Vlasnik:{ffffff}%s\n{fc864b}Garaza:{ffffff}%s",Garaza[i][gVlasnik],mica);
UpdateDynamic3DTextLabelText(garazasale[i],0x00FF00FF,result);
}
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);
OnCarUpdate();
OnPlayerUpdateCustom(playerid);
                                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!");
                                                return 1;
}
}
        }

Promenio sam isto tako ali opet je isto :S
float nisam pravio jer sam nub u skriptanju, :D

Citat: [FA] Benac poslato Jun 07, 2013, 22:55:42 POSLE PODNE
kada ti se respawn auto malo ti odskoci pa ti probadne kroz objekte probaj freze timer napravit ako se moze

Citaj gore :D