Szerző Téma: CP  (Megtekintve 803 alkalommal)

Nem elérhető Sramm

  • 596
    • Profil megtekintése
CP
« Dátum: 2012. június 22. - 13:35:34 »
0 Show voters
Sziasztok! Próbáltam megcsinálni a jogsi rendszert, amit cp-kel oldottam meg.Egy darabig megy is, de a forgalminál egyszerûen nem hajlandó mûködni. Mint ha nem adná meg neki az értéket, vagy nem tudom.
Ez a rész:
 
if(forgalmi[playerid] == 1)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Kövesse a GPS utasításait! Ne feledje, nehogy összetörje a jármûvet!\");
   SetPlayerRaceCheckpoint(playerid,0,2425.4612,-30.7842,26.9423,0.0,0.0,0.0,3.0);
   forgalmi[playerid]=2;
   return 1;
}

 
Egyszerûen nem hívódik meg. Pedig ott van, hogy forgalmi[playerid] = 1; .. Tehát amikor belemegyeknem adja be a cp-t , és nem írja ki a szöveget.
 
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(!IsPlayerInAnyVehicle(playerid))return HU(playerid, PIROS, \"Nem ülsz jármûben!\");
DisablePlayerRaceCheckpoint(playerid);
if(vizsgazik[playerid]==1)
{
if(holvan[playerid]==1)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Remek! Most forduljon meg az oszlopok vonalában.\");
   SetPlayerRaceCheckpoint(playerid,0,2391.1941,-83.2148,28.0650,0.0,0.0,0.0,3.0);
   holvan[playerid]=2;
}
else if(holvan[playerid]==2)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most álljon be az oszlopsor közepébe.\");
   SetPlayerRaceCheckpoint(playerid,0,2370.5623,-77.6814,28.0664,0.0,0.0,0.0,3.0);
   holvan[playerid]=3;
}
else if(holvan[playerid]==3)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most tolasson be az oszlopok közé.\");
   SetPlayerRaceCheckpoint(playerid,0,2375.7224,-112.5892,28.1232,0.0,0.0,0.0,3.0);
   holvan[playerid]=4;
}
else if(holvan[playerid]==4)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most parkolja le a kocsit.\");
   SetPlayerRaceCheckpoint(playerid,0,2377.1289,-112.1426,28.1737,0.0,0.0,0.0,3.0);
   holvan[playerid]=5;
}
else if(holvan[playerid]==5)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató] Gratulálunk, sikeresen letette a rutin vizsgát! Akár kezdhetjük is a forgalmit. Vigyázzon, nehogy összetörje a jármûvet!\");
//   SendClientMessage(playerid,HKEK,\"Ön megkapta a jogosítványt.\");
   DisablePlayerRaceCheckpoint(playerid);
   SetPlayerRaceCheckpoint(playerid,0,2346.4517,-47.5401,26.9425,0.0,0.0,0.0,3.0);
   holvan[playerid]=0;
/*   vizsgazik[playerid] = 0;
   kamionjogsizik[playerid] = 0;
   motorjogsizik[playerid] = 0;*/
   KillTimer(rutintimer[playerid]);
//   PlayerInfo[playerid][pJogsi]=1;
   new kocsi=GetPlayerVehicleID(playerid);
   SetVehicleToRespawn(kocsi);
   PutPlayerInVehicle(playerid,kocsi,0);
   RepairVehicle(kocsi);
   forgalmi[playerid] = 1;
}
return 1;
}
if(motorjogsizik[playerid]==1)
{
if(holvan[playerid]==1)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Remek! Most forduljon meg az oszlopok vonalában.\");
   SetPlayerRaceCheckpoint(playerid,0,2391.1941,-83.2148,28.0650,0.0,0.0,0.0,3.0);
   holvan[playerid]=2;
   return 1;
}
else if(holvan[playerid]==2)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most álljon be az oszlopsor közepébe.\");
   SetPlayerRaceCheckpoint(playerid,0,2370.5623,-77.6814,28.0664,0.0,0.0,0.0,3.0);
   holvan[playerid]=3;
   return 1;
}
else if(holvan[playerid]==3)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most tolasson be az oszlopok közé.\");
   SetPlayerRaceCheckpoint(playerid,0,2375.7224,-112.5892,28.1232,0.0,0.0,0.0,3.0);
   holvan[playerid]=4;
   return 1;
}
else if(holvan[playerid]==4)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most parkolja le a motort.\"); //2370.9565,-110.2176,29.0597
        SetPlayerRaceCheckpoint(playerid,0,2370.9565,-110.2176,29.0597,0.0,0.0,0.0,3.0);
   holvan[playerid]=5;
   return 1;
}
else if(holvan[playerid]==5)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató] Gratulálunk, sikeresen letette a rutin vizsgát! Akár kezdhetjük is a forgalmit. Vigyázzon, nehogy összetörje a jármûvet!\");
//   SendClientMessage(playerid,HKEK,\"Ön megkapta a jogosítványt.\");
   DisablePlayerRaceCheckpoint(playerid);
//   PlayerInfo[playerid][pMjogsi]= 1;
   SetPlayerRaceCheckpoint(playerid,0,2346.4517,-47.5401,26.9425,0.0,0.0,0.0,3.0);
   holvan[playerid]=0;
   //vizsgazik[playerid] = 0;
   //kamionjogsizik[playerid] = 0;
   //motorjogsizik[playerid] = 0;
   KillTimer(rutintimer[playerid]);
//   PlayerInfo[playerid][pJogsi]=1;
   new kocsi=GetPlayerVehicleID(playerid);
   SetVehicleToRespawn(kocsi);
   PutPlayerInVehicle(playerid,kocsi,0);
   RepairVehicle(kocsi);
   forgalmi[playerid] = 1;
   return 1;
}
return 1;
}
if(vizsgazik[playerid]==1 || kamionjogsizik[playerid] == 1 || motorjogsizik[playerid] == 1)
{
if(forgalmi[playerid] == 1)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Kövesse a GPS utasításait! Ne feledje, nehogy összetörje a jármûvet!\");
   SetPlayerRaceCheckpoint(playerid,0,2425.4612,-30.7842,26.9423,0.0,0.0,0.0,3.0);
   forgalmi[playerid]=2;
   return 1;
}
else if(forgalmi[playerid]==2)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Jól csinálja!\");
   SetPlayerRaceCheckpoint(playerid,0,2466.0122,26.5932,26.9429,0.0,0.0,0.0,3.0);
   forgalmi[playerid]=3;
   return 1;
}
else if(forgalmi[playerid]==3)
{
   SetPlayerRaceCheckpoint(playerid,0,2417.9387,43.4349,26.9445,0.0,0.0,0.0,3.0);
   forgalmi[playerid]=4;
   return 1;
}
else if(forgalmi[playerid]==4)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Ezaz.\");
   SetPlayerRaceCheckpoint(playerid,0,2317.9268,94.2142,26.9423,0.0,0.0,0.0,3.0);
   forgalmi[playerid]=5;
   return 1;
}
        else if(forgalmi[playerid]==5)
{
   SetPlayerRaceCheckpoint(playerid,0,2182.1682,86.9515,24.9582,0.0,0.0,0.0,3.0);
   forgalmi[playerid]=6;
   return 1;
}
else if(forgalmi[playerid]==6)
{
   SetPlayerRaceCheckpoint(playerid,0,2221.9089,61.8059,26.9424,0.0,0.0,0.0,3.0);
   forgalmi[playerid]=7;
   return 1;
}
else if(forgalmi[playerid]==7)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Ezaz.\");
   SetPlayerRaceCheckpoint(playerid,0,2265.2898,29.1063,27.2334,0.0,0.0,0.0,3.0);
   forgalmi[playerid]=8;
   return 1;
}
else if(forgalmi[playerid]==8)
{
   SetPlayerRaceCheckpoint(playerid,0,2291.2825,-81.8759,26.9418,0.0,0.0,0.0,3.0);
   forgalmi[playerid]=9;
   return 1;
}
else if(forgalmi[playerid]==9)
{
   SetPlayerRaceCheckpoint(playerid,0,2333.5110,-99.5207,26.9423,0.0,0.0,0.0,3.0);
   forgalmi[playerid]=10;
   return 1;
}
else if(forgalmi[playerid]==10)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Már a vége felé közeledünk!\");
   SetPlayerRaceCheckpoint(playerid,0,2369.9272,-85.8068,29.0751,0.0,0.0,0.0,3.0);
   forgalmi[playerid]=11;
   return 1;
}
else if(forgalmi[playerid]==11)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most parkolja le, és kész vagyunk!\");
   if(vizsgazik[playerid] == 1) SetPlayerRaceCheckpoint(playerid,0,2377.1289,-112.1426,28.1737,0.0,0.0,0.0,3.0);
   if(motorjogsizik[playerid] == 1) SetPlayerRaceCheckpoint(playerid,0,2358.6948,-94.3093,28.0669,0.0,0.0,0.0,3.0);
   if(kamionjogsizik[playerid] == 1)  SetPlayerRaceCheckpoint(playerid,0,2370.9565,-110.2176,29.0597,0.0,0.0,0.0,3.0);
   forgalmi[playerid]=12;
   return 1;
}
        else if(forgalmi[playerid]==12)
{
   SendClientMessage(playerid,ZOLD,\"[Oktató] Gratulálunk, sikeresen letette a forgalmi vizsgát is! Nagyszerû tanítvány volt!\");
   SendClientMessage(playerid,HKEK,\"[Oktató] Ön megkapta a jogosítványt.\");
   DisablePlayerRaceCheckpoint(playerid);
   if(kamionjogsizik[playerid] == 1) PlayerInfo[playerid][pKjogsi] = 1;
   if(motorjogsizik[playerid] == 1) PlayerInfo[playerid][pMjogsi] = 1;
   if(vizsgazik[playerid] == 1) PlayerInfo[playerid][pJogsi] = 1;
   forgalmi[playerid] = 0;
   holvan[playerid]=0;
   vizsgazik[playerid] = 0;
   kamionjogsizik[playerid] = 0;
   motorjogsizik[playerid] = 0;
   //KillTimer(rutintimer[playerid]);
   new kocsi=GetPlayerVehicleID(playerid);
   SetVehicleToRespawn(kocsi);
   RepairVehicle(kocsi);
   RemovePlayerFromVehicle(playerid);
    return 1;
}
return 1;
}
return 1;
}

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
CP
« Válasz #1 Dátum: 2012. június 22. - 13:39:51 »
0 Show voters
próbáld streamerrel

Nem elérhető Sramm

  • 596
    • Profil megtekintése
CP
« Válasz #2 Dátum: 2012. június 22. - 13:44:04 »
0 Show voters
Idézetet írta: ZzzzzZ date=1340365191\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"23223\" data-ipsquote-contentclass=\"forums_Topic
próbáld streamerrel
 
De semmi köze a változónak a streamerhez.

Dupla hozzászólás automatikusan összefûzve. ( 2012. június 22. - 15:13:40 )

Megcsináltam streamerrel, most már annyira sem mûködik, mint régen. Az elsõ cp-be belemegyek, eltûnik, és utána se kép, se hang.
 
public OnPlayerEnterDynamicRaceCP(playerid,checkpointid)
{
if(!IsPlayerInAnyVehicle(playerid))return HU(playerid, PIROS, \"Nem ülsz jármûben!\");
DestroyDynamicRaceCP(checkpointid);
if(vizsgazik[playerid]==1 || kamionjogsizik[playerid] == 1 || motorjogsizik[playerid] == 1)
{
if(checkpointid == jfcp[0])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Kövesse a GPS utasításait! Ne feledje, nehogy összetörje a jármûvet!\");
   jfcp[1] = CreateDynamicRaceCP(0, 2425.4612,-30.7842,26.9423,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   return 1;
}
else if(checkpointid == jfcp[1])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Jól csinálja!\");
   jfcp[2] = CreateDynamicRaceCP(0, 2466.0122,26.5932,26.9429,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   return 1;
}
else if(checkpointid == jfcp[2])
{
   jfcp[3] = CreateDynamicRaceCP(0, 2417.9387,43.4349,26.9445,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   return 1;
}
else if(checkpointid == jfcp[3])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Ezaz.\");
   jfcp[4] = CreateDynamicRaceCP(0, 2317.9268,94.2142,26.9423,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   return 1;
}
        else if(checkpointid == jfcp[4])
{
   jfcp[5] = CreateDynamicRaceCP(0,2182.1682,86.9515,24.9582,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   return 1;
}
else if(checkpointid == jfcp[5])
{
   jfcp[6] = CreateDynamicRaceCP(0, 2221.9089,61.8059,26.9424,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   return 1;
}
else if(checkpointid == jfcp[6])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Ezaz.\");
   jfcp[7] = CreateDynamicRaceCP(0, 2265.2898,29.1063,27.2334,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   return 1;
}
else if(checkpointid == jfcp[7])
{
   jfcp[8] = CreateDynamicRaceCP(0, 2291.2825,-81.8759,26.9418,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   return 1;
}
else if(checkpointid == jfcp[8])
{
   jfcp[9] = CreateDynamicRaceCP(0, 2333.5110,-99.5207,26.9423,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   return 1;
}
else if(checkpointid == jfcp[9])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Már a vége felé közeledünk!\");
   jfcp[10] = CreateDynamicRaceCP(0, 2369.9272,-85.8068,29.0751,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   return 1;
}
else if(checkpointid == jfcp[10])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most parkolja le, és kész vagyunk!\");
   if(vizsgazik[playerid] == 1) jfcp[11] = CreateDynamicRaceCP(0, 2377.1289,-112.1426,28.1737,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   if(motorjogsizik[playerid] == 1) jfcp[11] = CreateDynamicRaceCP(0, 2358.6948,-94.3093,28.0669,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   if(kamionjogsizik[playerid] == 1)  jfcp[11] = CreateDynamicRaceCP(0,2370.9565,-110.2176,29.0597,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   return 1;
}
        else if(checkpointid == jfcp[11])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató] Gratulálunk, sikeresen letette a forgalmi vizsgát is! Nagyszerû tanítvány volt!\");
   SendClientMessage(playerid,HKEK,\"[Oktató] Ön megkapta a jogosítványt.\");
   if(kamionjogsizik[playerid] == 1) PlayerInfo[playerid][pKjogsi] = 1;
   if(motorjogsizik[playerid] == 1) PlayerInfo[playerid][pMjogsi] = 1;
   if(vizsgazik[playerid] == 1) PlayerInfo[playerid][pJogsi] = 1;
   vizsgazik[playerid] = 0;
   kamionjogsizik[playerid] = 0;
   motorjogsizik[playerid] = 0;
   new kocsi=GetPlayerVehicleID(playerid);
   SetVehicleToRespawn(kocsi);
   RepairVehicle(kocsi);
   RemovePlayerFromVehicle(playerid);
   forgalmi[playerid] = 0;
    return 1;
}
return 1;
}
if(vizsgazik[playerid]==1)
{
if(checkpointid == jcp[0])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Remek! Most forduljon meg az oszlopok vonalában.\");
   jcp[1] = CreateDynamicRaceCP(0,2391.1941,-83.2148,28.0650,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
}
else if(checkpointid == jcp[1])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most álljon be az oszlopsor közepébe.\");
   jcp[2] = CreateDynamicRaceCP(0,2370.5623,-77.6814,28.0664,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
}
else if(checkpointid == jcp[2])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most tolasson be az oszlopok közé.\");
   jcp[3] = CreateDynamicRaceCP(0,2375.7224,-112.5892,28.1232,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
}
else if(checkpointid == jcp[3])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most parkolja le a kocsit.\");
   jcp[4] = CreateDynamicRaceCP(0,2377.1289,-112.1426,28.1737,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
}
else if(checkpointid == jcp[4])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató] Gratulálunk, sikeresen letette a rutin vizsgát! Akár kezdhetjük is a forgalmit. Vigyázzon, nehogy összetörje a jármûvet!\");
//   SendClientMessage(playerid,HKEK,\"Ön megkapta a jogosítványt.\");
   //DisablePlayerRaceCheckpoint(playerid);
   jfcp[0] = CreateDynamicRaceCP(0,2346.4517,-47.5401,26.9425,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   holvan[playerid]=0;
/*   vizsgazik[playerid] = 0;
   kamionjogsizik[playerid] = 0;
   motorjogsizik[playerid] = 0;*/
   KillTimer(rutintimer[playerid]);
//   PlayerInfo[playerid][pJogsi]=1;
   new kocsi=GetPlayerVehicleID(playerid);
   SetVehicleToRespawn(kocsi);
   PutPlayerInVehicle(playerid,kocsi,0);
   RepairVehicle(kocsi);
   holvan[playerid] = 0;
}
return 1;
}
if(motorjogsizik[playerid]==1)
{
if(checkpointid == jcp[0])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Remek! Most forduljon meg az oszlopok vonalában.\");
   jcp[1] = CreateDynamicRaceCP(0,2391.1941,-83.2148,28.0650,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
}
else if(checkpointid == jcp[1])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most álljon be az oszlopsor közepébe.\");
   jcp[2] = CreateDynamicRaceCP(0,2370.5623,-77.6814,28.0664,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
}
else if(checkpointid == jcp[2])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most tolasson be az oszlopok közé.\");
   jcp[3] = CreateDynamicRaceCP(0,2375.7224,-112.5892,28.1232,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
}
else if(checkpointid == jcp[3])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató]: Most parkolja le a motort.\"); //2370.9565,-110.2176,29.0597
        jcp[4] = CreateDynamicRaceCP(0,2370.9565,-110.2176,29.0597,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   return 1;
}
else if(checkpointid == jcp[4])
{
   SendClientMessage(playerid,ZOLD,\"[Oktató] Gratulálunk, sikeresen letette a rutin vizsgát! Akár kezdhetjük is a forgalmit. Vigyázzon, nehogy összetörje a jármûvet!\");
//   SendClientMessage(playerid,HKEK,\"Ön megkapta a jogosítványt.\");
   //DisablePlayerRaceCheckpoint(playerid);
//   PlayerInfo[playerid][pMjogsi]= 1;
   jfcp[0] = CreateDynamicRaceCP(0,2346.4517,-47.5401,26.9425,0.0,0.0,0.0, 4.0, 0, 0, playerid, 200.0);
   //vizsgazik[playerid] = 0;
   //kamionjogsizik[playerid] = 0;
   //motorjogsizik[playerid] = 0;
   KillTimer(rutintimer[playerid]);
//   PlayerInfo[playerid][pJogsi]=1;
   new kocsi=GetPlayerVehicleID(playerid);
   SetVehicleToRespawn(kocsi);
   PutPlayerInVehicle(playerid,kocsi,0);
   RepairVehicle(kocsi);
   holvan[playerid] = 0;
   return 1;
}
return 1;
}
return 1;

 
}
« Utoljára szerkesztve: 2012. június 22. - 15:14:16 írta Sramm »

Nem elérhető JBauer

  • 1407
    • Profil megtekintése
CP
« Válasz #3 Dátum: 2012. június 22. - 16:51:32 »
0 Show voters
DestroyDynamicRaceCP(checkpointid);

 
ezt ha kiveszed?

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal