public OnPlayerExitVehicle(playerid, vehicleid)
public OnPlayerExitVehicle(playerid, vehicleid) De ne csak ezt az egy sort... 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.
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]); }}}
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]); }}}