Jump to content
  • 0

Problema Checkpoint Misiune


NoNamed

Question

Problemă întâlnită (descriere): Poi iau o misiune, sau orice altceva ce se face prin checkpoint-uri si ma urc in masina totul merge ok, dar daca ma dau jos din masina dispare checkpoint-ul dar eu raman  cu misiunea .
Ero(area / rile) / warning-(ul / urile): Niciun warning , nici o eroare .
Liniile de cod / sursa / script-ul: Cereti ce credeti ca trebuie sa dau si voi da .
Imagini / Video (optional): -
Aţi încercat să rezolvaţi singur?: Da, am incercat sa reasez "OnPlayerEnterCheckpoint" dar degeaba ...

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

OnPlayerExitVehicle este mai ok , faci ceva de gen

public OnPlayerExitVehicle(,..)
{
if(Mision[playerid][mision] == 1)
{
DisablePlayerCheckpoint(playerid);
Mision[playerid][mision] = 0;
SendClientMessage(playerid,-1,"Misiunea a fost anulata deoarece ai iesit din masina!");
}
}
public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

Asta am la OnPlayerStateChange . La OnPlayerExitVehicle nu am nimic si nici nu vreau sa se termine misiunea cand te dai jos din masina pentru ca mai fac si misiuni care trebuie sa le faci numai pe jos, dar pana ajungi la checkpoint-ul misiunii doar nu vei merge pe jos daca e tocmai in LV/SF nu ? Problema nu este numai la misiune, este problema la orice checkpoint adica intru pe server  de exemplu, am checkpoint pus la scoala de soferi, urc intr-o masina si apoi ma dau jos, checkpoint-ul dispare ...

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new string[256];
new newcar = GetPlayerVehicleID(playerid);
new vehicle = GetPlayerVehicleID(playerid);
new name[MAX_PLAYER_NAME], Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
GetPlayerName(playerid,name,sizeof(name));
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(IsAnOwnableCar(newcar))
{
  /* if(CarInfo[newcar][cOwned]==0)
   {
       TogglePlayerControllable(playerid, 0);
       format(string, sizeof(string), "* Vehicul %s de vanzare.", CarInfo[newcar][cDescription]);
       SendClientMessage(playerid, COLOR_WHITE, string);
       format(string, sizeof(string), "Pret: *$%d*.{FFFFFF}Scrie {33ff33}/v buy{ffffff} sa cumperi vehiculul acesta.", CarInfo[newcar][cValue]);
       SendClientMessage(playerid, COLOR_WHITE, string);
   }*/
   if(CarInfo[newcar][cOwned]==1)
   {
       if(strcmp(name,CarInfo[newcar][cOwner], true) == 0)
    {
        format(string,sizeof(string)," * Vehiculul tau, %s . Ai grija ce faci .",CarInfo[newcar][cOwner]);
SendClientMessage(playerid, COLOR_BLUE, string);
if(PlayerInfo[playerid][pPcarkey] == vehicle) { }
else if(PlayerInfo[playerid][pPcarkey2] == vehicle) { }
else if(PlayerInfo[playerid][pPcarkey3] == vehicle) { }
}
else
{
if(IsPlayerAdmin(playerid))
{
   SendClientMessage(playerid, COLOR_GREY, " Poti conduce masina pentru ca esti logat cu RCON !");
}
                    else
   {
    SetPlayerPos(playerid,x,y,z+2);
}
format(string, sizeof(string), " * Vehicul detinut de catre %s, cauta alt vehicul !",CarInfo[newcar][cOwner]);
   SendClientMessage(playerid, COLOR_GREY, string);
}
   }
}
   if(IsAPlane(newcar))
   {
       if(PlayerOnMission[playerid] > 0)
{
MissionCheckpoint[playerid] = 0;
PlayerInfo[playerid][pMissionNr] = 0;
PlayerOnMission[playerid] = 0;
GameTextForPlayer(playerid, "~r~Mission Failed", 5000, 3);
Delete3DTextLabel(Text3D:MissionLabel[playerid]);
new playername[128];
GetPlayerName(playerid, playername, 128);
format(string, 256, "CVLBoT: {FFFF00}%s was kicked because used Heli/Plane at Mission.(Next Time Warn)", playername);
SendClientMessage(playerid, COLOR_RED, string);
Kick(playerid);
return 1;
}
   }
   if(newcar == 2)// masini de la casa
{
             if(PlayerInfo[playerid][pPhousekey] == 1 ) { }
    else
        {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
             }
}
if(newcar == 1)
{
if(PlayerInfo[playerid][pPhousekey] == 0) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 3)
{
if(PlayerInfo[playerid][pPhousekey] == 2) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 4)
{
if(PlayerInfo[playerid][pPhousekey] == 3) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 5)
{
if(PlayerInfo[playerid][pPhousekey] == 4) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 6)
{
if(PlayerInfo[playerid][pPhousekey] == 5) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 7)
{
if(PlayerInfo[playerid][pPhousekey] == 6) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 8)
{
if(PlayerInfo[playerid][pPhousekey] == 7) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 9)
{
if(PlayerInfo[playerid][pPhousekey] == 8) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 10)
{
if(PlayerInfo[playerid][pPhousekey] == 9) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
   if(newcar == 11)
{
if(PlayerInfo[playerid][pPhousekey] == 10) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 12)
{
if(PlayerInfo[playerid][pPhousekey] == 11) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 13)
{
if(PlayerInfo[playerid][pPhousekey] == 12) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 14)
{
if(PlayerInfo[playerid][pPhousekey] == 13) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 15)
{
if(PlayerInfo[playerid][pPhousekey] == 14) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 16)
{
if(PlayerInfo[playerid][pPhousekey] == 15) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 17)
{
if(PlayerInfo[playerid][pPhousekey] == 16) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 18)
{
if(PlayerInfo[playerid][pPhousekey] == 17) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 19)
{
if(PlayerInfo[playerid][pPhousekey] == 18) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 20)
{
if(PlayerInfo[playerid][pPhousekey] == 19) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
        }
  if(newcar == 21)
{
if(PlayerInfo[playerid][pPhousekey] == 20) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 22)
{
if(PlayerInfo[playerid][pPhousekey] == 21) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 23)
{
if(PlayerInfo[playerid][pPhousekey] == 22) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 24)
{
if(PlayerInfo[playerid][pPhousekey] == 23) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 25)
{
if(PlayerInfo[playerid][pPhousekey] == 24) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 26)
{
if(PlayerInfo[playerid][pPhousekey] == 25) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 27)
{
if(PlayerInfo[playerid][pPhousekey] == 26) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 28)
{
if(PlayerInfo[playerid][pPhousekey] == 27) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 29)
{
if(PlayerInfo[playerid][pPhousekey] == 28) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 30)
{
if(PlayerInfo[playerid][pPhousekey] == 29) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 31)
{
if(PlayerInfo[playerid][pPhousekey] == 30) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 32)
{
if(PlayerInfo[playerid][pPhousekey] == 31) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 33)
{
if(PlayerInfo[playerid][pPhousekey] == 32) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 34)
{
if(PlayerInfo[playerid][pPhousekey] == 33) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 35)
{
if(PlayerInfo[playerid][pPhousekey] == 34) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 36)
{
if(PlayerInfo[playerid][pPhousekey] == 35) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
   if(newcar == 37)
{
if(PlayerInfo[playerid][pPhousekey] == 36) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
        if(newcar == 38)
{
if(PlayerInfo[playerid][pPhousekey] == 37) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 39)
{
if(PlayerInfo[playerid][pPhousekey] == 38) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 40)
{
if(PlayerInfo[playerid][pPhousekey] == 39) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 41)
{
if(PlayerInfo[playerid][pPhousekey] == 40) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 42)
{
if(PlayerInfo[playerid][pPhousekey] == 41) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 43)
{
if(PlayerInfo[playerid][pPhousekey] == 42) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 44)
{
if(PlayerInfo[playerid][pPhousekey] == 43) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 45)
{
if(PlayerInfo[playerid][pPhousekey] == 44) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 46)
{
if(PlayerInfo[playerid][pPhousekey] == 45) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 47)
{
if(PlayerInfo[playerid][pPhousekey] == 48) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 48)
{
if(PlayerInfo[playerid][pPhousekey] == 47) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 49)
{
if(PlayerInfo[playerid][pPhousekey] == 48) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 50)
{
if(PlayerInfo[playerid][pPhousekey] == 49) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 51)
{
if(PlayerInfo[playerid][pPhousekey] == 50) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 52)
{
if(PlayerInfo[playerid][pPhousekey] == 51) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 53)
{
if(PlayerInfo[playerid][pPhousekey] == 52) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 54)
{
if(PlayerInfo[playerid][pPhousekey] == 53) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 55)
{
if(PlayerInfo[playerid][pPhousekey] == 54) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 56)
{
if(PlayerInfo[playerid][pPhousekey] == 55) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 57)
{
if(PlayerInfo[playerid][pPhousekey] == 56) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 58)
{
if(PlayerInfo[playerid][pPhousekey] == 57) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 59)
{
if(PlayerInfo[playerid][pPhousekey] == 58) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 60)
{
if(PlayerInfo[playerid][pPhousekey] == 59) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 61)
{
if(PlayerInfo[playerid][pPhousekey] == 60) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 62)
{
if(PlayerInfo[playerid][pPhousekey] == 61) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
        if(newcar == 63)
{
if(PlayerInfo[playerid][pPhousekey] == 62) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 64)
{
if(PlayerInfo[playerid][pPhousekey] == 63) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 65)
{
if(PlayerInfo[playerid][pPhousekey] == 64) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 66)
{
if(PlayerInfo[playerid][pPhousekey] == 65) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 67)
{
if(PlayerInfo[playerid][pPhousekey] == 68) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 68)
{
if(PlayerInfo[playerid][pPhousekey] == 67) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
        if(newcar == 69)
{
if(PlayerInfo[playerid][pPhousekey] == 68) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 70)
{
if(PlayerInfo[playerid][pPhousekey] == 69) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 71)
{
if(PlayerInfo[playerid][pPhousekey] == 70) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 72)
{
if(PlayerInfo[playerid][pPhousekey] == 71) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 73)
{
if(PlayerInfo[playerid][pPhousekey] == 72) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 74)
{
if(PlayerInfo[playerid][pPhousekey] == 73) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 75)
{
if(PlayerInfo[playerid][pPhousekey] == 74) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 76)
{
if(PlayerInfo[playerid][pPhousekey] == 75) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 77)
{
if(PlayerInfo[playerid][pPhousekey] == 76) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 78)
{
if(PlayerInfo[playerid][pPhousekey] == 77) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 79)
{
if(PlayerInfo[playerid][pPhousekey] == 78) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 80)
{
if(PlayerInfo[playerid][pPhousekey] == 79) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 81)
{
if(PlayerInfo[playerid][pPhousekey] == 80) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 82)
{
if(PlayerInfo[playerid][pPhousekey] == 81) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 83)
{
if(PlayerInfo[playerid][pPhousekey] == 82) { }
else
   {
SendClientMessage(playerid, COLOR_GRAD1,"You don't have permission to drive this car.Rent a room owner first.");
RemovePlayerFromVehicle(playerid);
}
}
}
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_ONFOOT)
{
   if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
{
   PlayerInKart[playerid] = 0;
   KartingPlayers --;
}
   if(TransportDuty[playerid] > 0)
{
   if(TransportDuty[playerid] == 1)
{
       TaxiDrivers -= 1;
}
else if(TransportDuty[playerid] == 2)
{
   BusDrivers -= 1;
}
TransportDuty[playerid] = 0;
format(string, sizeof(string), "* You are now Off Duty and earned $%d.", TransportMoney[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GivePlayerMoney(playerid, TransportMoney[playerid]);
ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
}
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
{
   if(IsPlayerConnected(TransportDriver[playerid]))
{
   TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
   TransportTime[TransportDriver[playerid]] = 0;
   TransportCost[TransportDriver[playerid]] = 0;
   format(string, sizeof(string), "~w~The ride cost~n~~r~$%d",TransportCost[playerid]);
   GameTextForPlayer(playerid, string, 5000, 1);
   format(string, sizeof(string), "~w~Passenger left the taxi~n~~g~Earned $%d",TransportCost[playerid]);
   GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
GivePlayerMoney(playerid, -TransportCost[playerid]);
TransportCost[playerid] = 0;
TransportTime[playerid] = 0;
TransportDriver[playerid] = 999;
}
}
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
}
if(newstate == PLAYER_STATE_PASSENGER) // TAXI & BUSSES
{
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
       if(IsPlayerConnected(i))
       {
           if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2 && TransportDuty > 0)
           {
               if(GetPlayerMoney(playerid) < TransportValue)
               {
                   format(string, sizeof(string), "* You need $%d to enter.", TransportValue);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
RemovePlayerFromVehicle(playerid);
               }
               else
               {
                   if(TransportDuty == 1)
                   {
                       format(string, sizeof(string), "* You paid $%d to the Taxi Driver.", TransportValue);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Passenger %s has entered your Taxi.", name);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
TransportTime = 1;
                    TransportTime[playerid] = 1;
                    TransportCost[playerid] = TransportValue;
                    TransportCost = TransportValue;
                    TransportDriver[playerid] = i;
                   }
                   else if(TransportDuty == 2)
                   {
                       format(string, sizeof(string), "* You paid $%d to the Bus Driver.", TransportValue);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Passenger %s has entered your Bus.", name);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
                   }
GivePlayerMoney(playerid, - TransportValue);
TransportMoney += TransportValue;
               }
           }
       }
   }
}
 
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT) // Player entered a vehicle as a driver
    {
    new pName[24];
    GetPlayerName(playerid, pName, 24);
    format(string, 128, "* %s has left the vehicle.", pName);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
 
if(oldstate == PLAYER_STATE_PASSENGER && newstate == PLAYER_STATE_ONFOOT) // Player entered a vehicle as a driver
    {
    new pName[24];
    GetPlayerName(playerid, pName, 24);
    format(string, 128, "* %s has left the vehicle.", pName);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
 
if(newstate == PLAYER_STATE_WASTED)
{
if(WantedLevel[playerid] >= 1)
{
   new price = WantedLevel[playerid] * 2000;
new count;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
   if(IsACop(i) && CrimInRange(50.0, playerid,i))
   {
count = 1;
format(string, sizeof(string), "~w~Running Suspect~r~Killed~n~Bonus~g~$%d", price);
GameTextForPlayer(i, string, 5000, 1);
ConsumingMoney = 1;
GivePlayerMoney(i, price / 2);
PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
}
}
}
if(count == 1)
{
GivePlayerMoney(playerid, - price);
PlayerInfo[playerid][pWantedDeaths] += 1;
PlayerInfo[playerid][pJailed] = 1;
   PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid])*(200);
   format(string, sizeof(string), "* You are in Jail for %d Seconds and lose $%d because of running away and getting shot by the Officer.", PlayerInfo[playerid][pJailTime], price);
   SendClientMessage(playerid, COLOR_LIGHTRED, string);
   WantedPoints[playerid] = 0;
WantedLevel[playerid] = 0;
SetPlayerSpawn(playerid);
OnPlayerUpdateEx(playerid);
OnPlayerUpdate(playerid);
}
}
}
if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
{// 38 / 49 / 56 = SS
new oldcar = gLastCar[playerid];
new housecar = PlayerInfo[playerid][pPhousekey]+1;
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
if(IsABoat(newcar))
{
   if(PlayerInfo[playerid][pBoatLic] < 1)
{
   SendClientMessage(playerid, COLOR_GREY, "   You don't know how to Sail yet, so you left the Boat !");
   RemovePlayerFromVehicle(playerid);
}
}
if(PlayerOnMission[playerid] > 0)
{
 
 
}
new str[80];
if (newstate == 2 || newstate == 3)
   {
      format(str, sizeof(str), "~p~%s",vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
      GameTextForPlayer(playerid, str, 300, 1);
        }
else if(IsAPlane(newcar))
{
   if(PlayerInfo[playerid][pFlyLic] < 1)
{
   if(TakingLesson[playerid] == 1) { }
   else {
   SendClientMessage(playerid, COLOR_GREY, "   You don't know how to Fly yet, so you left the Plane !");
   RemovePlayerFromVehicle(playerid); }
}
}
else if(IsAPlane(newcar))
{
   if(PlayerInfo[playerid][pFlyLic] < 1)
{
   if(TakingLesson[playerid] == 1) { }
   else {
   SendClientMessage(playerid, COLOR_GREY, "   You don't know how to Fly yet, so you left the Plane !");
   RemovePlayerFromVehicle(playerid); }
}
}
else
{
if(PlayerInfo[playerid][pCarLic] < 1)
{
   if(IsABike(newcar))
{
   return 1;
}
if(TakingLesson[playerid] == 1) { }
else {
SendClientMessage(playerid, COLOR_GREY, "   You don't know how to Drive yet, so you left the Car !");
                RemovePlayerFromVehicle(playerid); }
}
}
if(IsACopCar(newcar))
{
   if(IsACop(playerid)) { }
   else { RemovePlayerFromVehicle(playerid); }
}
else if(IsAnAmbulance(newcar))
{
   if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4) { }
   else { RemovePlayerFromVehicle(playerid); }
}
if(IsATruck(newcar))
{
format(string, sizeof(string), "Products: %d/%d", PlayerHaul[newcar][pLoad],PlayerHaul[newcar][pCapasity]);
SendClientMessage(playerid, TEAM_GroveStreet_COLOR, string);
SendClientMessage(playerid, COLOR_WHITE, "INFO: You can deliver Products to Businesses.");
SendClientMessage(playerid, COLOR_WHITE, "INFO: Commands are /load /buyprods /sellprods");
}
if(PlayerKarting[playerid] != 0)
{
   new kart = GetPlayerVehicleID(playerid);
   if(kart==KART||kart==KART1||kart==KART2||kart==KART3||kart==KART4||kart==KART5)
   {
       PlayerInKart[playerid] = 1;
    KartingPlayers ++;
}
}
if(newcar == NG1 || newcar == NG2 || newcar == NG3)
{
   if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//national guard
   {
       if(PlayerInfo[playerid][pRank] < 3)
       {
       SendClientMessage(playerid,COLOR_GREY,"   You need Rank 3 to Fly this baby !");
       RemovePlayerFromVehicle(playerid);
       }
   }
   else
   {
       RemovePlayerFromVehicle(playerid);
   }
}
if(newcar == BUS1 || newcar == BUS2)
{
   if(PlayerInfo[playerid][pJob] != 14)
   {
       SendClientMessage(playerid,COLOR_GREY,"   You are not a Bus Driver !");
       RemovePlayerFromVehicle(playerid);
   }
}
if(newcar == SWAT || newcar == SWAT1)
{
   if(swat[playerid] == 0)
   {
       SendClientMessage(playerid,COLOR_GREY,"   You are not echiped as Swat !");
       RemovePlayerFromVehicle(playerid);
   }
}
if(newcar == SI1 || newcar == SI2 || newcar == SI3)
{
   if(TakingLesson[playerid] == 1) { }
   else if(!IsAnInstructor(playerid))
   {
       SendClientMessage(playerid,COLOR_GREY,"   You are not a School Instructor !");
       RemovePlayerFromVehicle(playerid);
   }
}
if(newcar == TAXI1 || newcar == TAXI2 || newcar == TAXI3 || newcar == TAXI4)
{
   if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10) { }
   else
{
       SendClientMessage(playerid,COLOR_GREY,"   You are not a Taxi Driver !");
       RemovePlayerFromVehicle(playerid);
   }
}
if(newcar == HA1 || newcar == HA2 || newcar == HA3 || newcar == HA4)
{
   if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8){ }
   else
   {
       SendClientMessage(playerid, COLOR_GREY, "   You are not a Hitman !");
   RemovePlayerFromVehicle(playerid);
   }
}
if(newcar == NR1 || newcar == NR2 || newcar == NR3)
{
if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9){ }
else
{
   SendClientMessage(playerid, COLOR_GREY, "   You are not a News Reporter !");
   RemovePlayerFromVehicle(playerid);
}
if(PlayerInfo[playerid][pNewsSkill] < 200 && newcar == 140)
{
   SendClientMessage(playerid, COLOR_GREY, "   Your News Reporter Skill is to low, cant fly the Chopper yet !");
   RemovePlayerFromVehicle(playerid);
}
}
if(newcar == GST1 || newcar == GST2 || newcar == GST3 || newcar == GST4 || newcar == GST5 || newcar == GST6 || newcar == GST7)
{
            if(PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12) { }
   else
{
       SendClientMessage(playerid,COLOR_GREY,"   You are not a member of Grove Street");
       RemovePlayerFromVehicle(playerid);
   }
}
if(newcar == BLS1 || newcar == BLS2 || newcar == BLS3 || newcar == BLS4 || newcar == BLS5 || newcar == BLS6)
{
            if(PlayerInfo[playerid][pMember] == 13||PlayerInfo[playerid][pLeader] == 13) { }
   else
{
       SendClientMessage(playerid,COLOR_GREY,"   You are not a member of Ballas");
       RemovePlayerFromVehicle(playerid);
   }
}
        if(newcar == LSV1 || newcar == LSV2 || newcar == LSV3 || newcar == LSV4 || newcar == LSV5)
        {
            if(PlayerInfo[playerid][pMember] == 14||PlayerInfo[playerid][pLeader] == 14) { }
   else
{
       SendClientMessage(playerid,COLOR_GREY,"   You are not a member of Los Santos Vagos !");
       RemovePlayerFromVehicle(playerid);
   }
}
if(newcar == VLA1 || newcar == VLA2 || newcar == VLA3 || newcar == VLA4 || newcar == VLA5)
{
            if(PlayerInfo[playerid][pMember] == 15||PlayerInfo[playerid][pLeader] == 15) { }
   else
{
       SendClientMessage(playerid,COLOR_GREY,"   You are not a member of Varriors Los Aztecas !");
       RemovePlayerFromVehicle(playerid);
   }
}
        if(newcar == TRM1|| newcar == TRM2 || newcar == TRM3 || newcar == TRM4 || newcar == TRM5)
{
            if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5) { }
   else
{
       SendClientMessage(playerid,COLOR_GREY,"   You are not a member of The Mafia !");
       RemovePlayerFromVehicle(playerid);
   }
}
        if(newcar == DNB1 || newcar == DNB2 || newcar == DNB3 || newcar == DNB4 || newcar == DNB5)
{
            if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6) { }
   else
{
       SendClientMessage(playerid,COLOR_GREY,"   You are not a member of The Triads !");
       RemovePlayerFromVehicle(playerid);
   }
}
if(newcar == MAYOR1 || newcar == MAYOR2 || newcar == MAYOR3)
{
   if(PlayerInfo[playerid][pLeader] == 7) { }
   else
{
       SendClientMessage(playerid,COLOR_GREY,"   You are not the Mayor !");
       RemovePlayerFromVehicle(playerid);
   }
}
if(newcar == TRUCK1 || newcar == TRUCK2 || newcar == TRUCK3)
{
            if(PlayerInfo[playerid][pJob] == 14){ }
   else
{
       SendClientMessage(playerid,COLOR_GREY,"   You are not a Truker !");
       RemovePlayerFromVehicle(playerid);
   }
}
if(newcar == NFSCAR1 || newcar == NFSCAR2 || newcar == NFSCAR3 || newcar == NFSCAR4 || newcar == NFSCAR5 || newcar == NFSCAR6 || newcar == NFSCAR7 || newcar == NFSCAR8 || newcar == NFSCAR9 || newcar == NFSCAR10 || newcar == NFSCAR11)
{
            if(PlayerInfo[playerid][pNfs] >= 1){ }
   else
{
       SendClientMessage(playerid,COLOR_GREY,"   You are not a Member of NFS Club !");
       RemovePlayerFromVehicle(playerid);
   }
}
if(newcar==KART||newcar==KART1||newcar==KART2||newcar==KART3||newcar==KART4||newcar==KART5)
{
   if(PlayerKarting[playerid] != 1)
   {
       RemovePlayerFromVehicle(playerid);
   }
}
if(newcar == RENT1 || newcar == RENT2 || newcar == RENT3)
{
if (HireCar[playerid] != newcar)
{
format(string, sizeof(string), "~w~You can Rent this car~n~Cost:~g~$%d~n~~w~To rent type ~g~/rentcar~w~~n~to get out type ~r~/exit",SBizzInfo[0][sbEntranceCost]);
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, string, 5000, 3);
}
}
if(newcar == RENT4 || newcar == RENT5 || newcar == RENT6 || newcar == RENT7)
{
if (HireCar[playerid] != newcar)
{
format(string, sizeof(string), "~w~You can Rent this car~n~Cost:~g~$%d~n~~w~To rent type ~g~/rentcar~w~~n~to get out type ~r~/exit",SBizzInfo[1][sbEntranceCost]);
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, string, 5000, 3);
}
}
if(newcar == DMV1 || newcar == DMV2 || newcar == DMV3 || newcar == DMV4 || newcar == DMV5 || newcar == DMV6)
        {
          if(TakingLesson[playerid] == 1)
          {
             KillTimer(dmvtimer1);
             DMVCountDown(playerid);
             SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Instructor]:Urmeaza checkpointurile pentru a trece traseul.Ai la dizpozitie 90 de secunde ");
             SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Instructor]:Condu pe partea dreapta si ai grija la celelalte masini !");
             GetPlayerName(playerid, name, sizeof(name));
             CP[playerid] = 100;
             SetPlayerCheckpoint(playerid, 1149.3123,-1712.3945,13.3663,5.0);
          }
          else
          {
            SendClientMessage(playerid,COLOR_GREY,"Acest vehicul este pentru testul de conducere !");
            RemovePlayerFromVehicle(playerid);
          }
        }
if(oldcar != 301)
{
if((housecar != oldcar && oldcar != 0) && (HireCar[playerid] != oldcar && newcar != housecar))
{
if(gLastDriver[oldcar] == playerid && oldcar != newcar)
{
gLastDriver[oldcar] = 300;
gCarLock[oldcar] = 1;
UnLockCar(oldcar);
}
}
}
gLastCar[playerid] = newcar;
gLastDriver[newcar] = playerid;
}
if(newstate == PLAYER_STATE_SPAWNED)
{
new Float: lwx, Float:lwy, Float:lwz;
GetPlayerPos(playerid, lwx, lwy, lwz);
if((lwz > 530.0 && PlayerInfo[playerid][pInt] == 0) || PlayerToPoint(1000.0, playerid, -1041.9,-1868.4,79.1)) //the highest land point in sa = 526.8
{
SetPlayerSpawn(playerid);
}
if(PlayerOnMission[playerid] > 0)
{
GameTextForPlayer(playerid, "~r~Mission failed", 5000, 3);
PlayerOnMission[playerid] = 0;
   PlayerInfo[playerid][pMissionNr] = 0;
   MissionCheckpoint[playerid] = 0;
   DisablePlayerCheckpoint(playerid);
   Delete3DTextLabel(Text3D:MissionLabel[playerid]);
}
if(PlayerInfo[playerid][pDonateRank] > 0) { SetPlayerHealth(playerid, 100.0); }
else { SetPlayerHealth(playerid, 50.0+PlayerInfo[playerid][pSHealth]); }
MedicBill[playerid] = 1;
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
gPlayerSpawned[playerid] = 1;
SafeTime[playerid] = 60;
}
return 1;
}
Edited by NoNamed
Link to comment
Share on other sites

Daca iti apare mesaul "Mission failed" sterge

[pawn]if(PlayerOnMission[playerid] > 0)
{
GameTextForPlayer(playerid, "~r~Mission failed", 5000, 3);
PlayerOnMission[playerid] = 0;
PlayerInfo[playerid][pMissionNr] = 0;
MissionCheckpoint[playerid] = 0;
DisablePlayerCheckpoint(playerid);
Delete3DTextLabel(Text3D:MissionLabel[playerid]);
}[/pawn]

Link to comment
Share on other sites

Daca mi-ar fi aparut as fi stiut sa-l rezolv dar asta  e problema, ca nu e doar la cp-ul de la misiune ci la orice cp de pe server ... sa zicem ca am event-ul cu servieta :  ma duc , iau servieta imi apare cp-ul unde trebuie sa o duc... ma urc in masina , ma dau din greseala jos si pac, a disparut checkpoint-ul ... deci orice checkpoint nu numai cel de la misiune...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.