Szerző Téma: Saját autó spawn  (Megtekintve 1034 alkalommal)

Saját autó spawn
« Dátum: 2012. június 09. - 10:14:22 »
0 Show voters
Sziasztok.
Miért van az hogy folyton ha kiszállok a saját autómbol lespawnol oda?

Nem elérhető Norby

  • 1575
    • Profil megtekintése
Saját autó spawn
« Válasz #1 Dátum: 2012. június 09. - 10:19:59 »
0 Show voters
Mert lementi a koordinátákat és újra spawnolja a lementett koordinátákkal.
Általában RP szervereken szokott ilyen lenni.

Saját autó spawn
« Válasz #2 Dátum: 2012. június 09. - 10:22:30 »
0 Show voters
És nem lehet kiszedni?
Elég zavaró hogy kiszállok és a fejem fölé megy a kocsi.
Meg ott marad. :S

Nem elérhető Norby

  • 1575
    • Profil megtekintése
Saját autó spawn
« Válasz #3 Dátum: 2012. június 09. - 10:23:36 »
0 Show voters
Másold be az OnPlayerExitVehicle eljárást.

Saját autó spawn
« Válasz #4 Dátum: 2012. június 09. - 10:28:41 »
0 Show voters
public OnPlayerExitVehicle(playerid, vehicleid)

Nem elérhető Norby

  • 1575
    • Profil megtekintése
Saját autó spawn
« Válasz #5 Dátum: 2012. június 09. - 11:24:35 »
0 Show voters
Idézetet írta: Devil112 date=1339230521\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"22594\" data-ipsquote-contentclass=\"forums_Topic
public OnPlayerExitVehicle(playerid, vehicleid)
 
De ne csak ezt az egy sort... :D
Ami alatta van.

Nem elérhető Erik3333

  • 945
  • SMF | phpBB | TS3 | PHP | HTML | CSS | JS | PAWN | JAVA
    • Profil megtekintése
Saját autó spawn
« Válasz #6 Dátum: 2012. június 09. - 11:27:09 »
0 Show voters
Idézetet írta: Norby date=1339233875\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"22594\" data-ipsquote-contentclass=\"forums_Topic


public OnPlayerExitVehicle(playerid, vehicleid)
 
De ne csak ezt az egy sort... :D
Ami alatta van.
 
[/quote]
Ezzel is vigyázni kell, mert nem lehet tudni, hogy csak az eljárást másolja be, vagy mindent, ami alatta van.
{ ettõl } eddig másold be.

Saját autó spawn
« Válasz #7 Dátum: 2012. június 09. - 11:47:53 »
0 Show voters

public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(vehicleid >= 131 && vehicleid <= 134) // vizsgakocsi
{
Msg(playerid,\"[Oktató]: Kiszállt a kocsiból, így megbukott a vizsgán\");
DrivingStep[playerid] = 0;
TakingForgalmi[playerid] = 0;
TakingRutin[playerid] = 0;
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
DisablePlayerRaceCheckpoint(playerid);
}
if (GetPlayerState(playerid) == 1)
{
return 1;
}
new playerState = GetPlayerState(playerid);
    if (playerState == PLAYER_STATE_DRIVER)
    {
if(IsAnOwnableCar(vehicleid))
{
   if(vehicleid == PlayerInfo[playerid][pPcarkey] || vehicleid == PlayerInfo[playerid][pPcarkey2] || vehicleid == PlayerInfo[playerid][kolcsonkocsikulcs])
   {
         /*new Float:x,Float:y,Float:z;
      new Float:a;
      GetVehiclePos(vehicleid, x, y, z);
      GetVehicleZAngle(vehicleid, a);
      CarInfo[vehicleid][cLocationx] = x;
      CarInfo[vehicleid][cLocationy] = y;
      CarInfo[vehicleid][cLocationz] = z;
      CarInfo[vehicleid][cAngle] = a;
      //SetVehiclePos(vehicleid, x, y, z+2);
      //SetVehicleZAngle(vehicleid, a);
      //OnPropUpdate();*/
      new Float:health;
      new Float:x,Float:y,Float:z;
      new Float:a;
      new carid;
      carid = GetPlayerVehicleID(playerid);
      GetVehicleHealth(carid, health);
      GetVehiclePos(carid, x, y, z);
      GetPlayerFacingAngle(playerid, a);
      GetVehicleZAngle(carid, a);
      CarInfo[carid][cLocationx] = x;
      CarInfo[carid][cLocationy] = y;
      CarInfo[carid][cLocationz] = z;
      CarInfo[carid][cAngle] = a;
      SaveCarCoords();
      OnPlayerUpdate(playerid);
       DestroyVehicle(carid);
       CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy]+1.0,CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],-1);
        SetVehicleHealth(carid, health);
        new string[20];
      format(string, sizeof(string), \"ALR-%d\", carid);
       SetVehicleNumberPlate(carid, string);
        AddVehicleComponent(carid,CarInfo[carid][cKerek]);
      ChangeVehiclePaintjob(carid, CarInfo[carid][cPaintjob]-1);
      AddVehicleComponent(carid,CarInfo[carid][cKinezet1]);
      AddVehicleComponent(carid,CarInfo[carid][cKinezet2]);
      AddVehicleComponent(carid,CarInfo[carid][cKinezet3]);
      AddVehicleComponent(carid,CarInfo[carid][cKinezet4]);
      AddVehicleComponent(carid,CarInfo[carid][cKinezet5]);
      AddVehicleComponent(carid,CarInfo[carid][cKinezet6]);
      AddVehicleComponent(carid,CarInfo[carid][cKinezet7]);
      AddVehicleComponent(carid,CarInfo[carid][cKinezet8]);
      AddVehicleComponent(carid,CarInfo[carid][cKinezet9]);
      AddVehicleComponent(carid,CarInfo[carid][cKinezet10]);
      AddVehicleComponent(carid,CarInfo[carid][cNitro]);
      AddVehicleComponent(carid,CarInfo[carid][cHidraulika]);
             }
}
}

Nem elérhető Norby

  • 1575
    • Profil megtekintése
Saját autó spawn
« Válasz #8 Dátum: 2012. június 09. - 12:26:10 »
0 Show voters
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(vehicleid >= 131 && vehicleid <= 134) // vizsgakocsi
{
Msg(playerid,\"[Oktató]: Kiszállt a kocsiból, így megbukott a vizsgán\");
DrivingStep[playerid] = 0;
TakingForgalmi[playerid] = 0;
TakingRutin[playerid] = 0;
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
DisablePlayerRaceCheckpoint(playerid);
  }
if (GetPlayerState(playerid) == 1)
{
return 1;
}
  new playerState = GetPlayerState(playerid);
    if (playerState == PLAYER_STATE_DRIVER)
    {
if(IsAnOwnableCar(vehicleid))
{
if(vehicleid == PlayerInfo[playerid][pPcarkey] || vehicleid == PlayerInfo[playerid][pPcarkey2] || vehicleid == PlayerInfo[playerid][kolcsonkocsikulcs])
{
    /*new Float:x,Float:y,Float:z;
new Float:a;
GetVehiclePos(vehicleid, x, y, z);
GetVehicleZAngle(vehicleid, a);
CarInfo[vehicleid][cLocationx] = x;
CarInfo[vehicleid][cLocationy] = y;
CarInfo[vehicleid][cLocationz] = z;
CarInfo[vehicleid][cAngle] = a;
//SetVehiclePos(vehicleid, x, y, z+2);
//SetVehicleZAngle(vehicleid, a);
//OnPropUpdate();*/
new Float:health;
new Float:x,Float:y,Float:z;
new Float:a;
new carid;
carid = GetPlayerVehicleID(playerid);
GetVehicleHealth(carid, health);
GetVehiclePos(carid, x, y, z);
GetPlayerFacingAngle(playerid, a);
GetVehicleZAngle(carid, a);
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
SaveCarCoords();
OnPlayerUpdate(playerid);
        SetVehicleHealth(carid, health);
        new string[20];
format(string, sizeof(string), \"ALR-%d\", carid);
    SetVehicleNumberPlate(carid, string);
        AddVehicleComponent(carid,CarInfo[carid][cKerek]);
ChangeVehiclePaintjob(carid, CarInfo[carid][cPaintjob]-1);
AddVehicleComponent(carid,CarInfo[carid][cKinezet1]);
AddVehicleComponent(carid,CarInfo[carid][cKinezet2]);
AddVehicleComponent(carid,CarInfo[carid][cKinezet3]);
AddVehicleComponent(carid,CarInfo[carid][cKinezet4]);
AddVehicleComponent(carid,CarInfo[carid][cKinezet5]);
AddVehicleComponent(carid,CarInfo[carid][cKinezet6]);
AddVehicleComponent(carid,CarInfo[carid][cKinezet7]);
AddVehicleComponent(carid,CarInfo[carid][cKinezet8]);
AddVehicleComponent(carid,CarInfo[carid][cKinezet9]);
AddVehicleComponent(carid,CarInfo[carid][cKinezet10]);
AddVehicleComponent(carid,CarInfo[carid][cNitro]);
AddVehicleComponent(carid,CarInfo[carid][cHidraulika]);
        }
}
}

Saját autó spawn
« Válasz #9 Dátum: 2012. június 09. - 20:59:09 »
0 Show voters
Warningos az egész :S

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal