Szerző Téma: Jogsi rendszer hiba!!! SegitseG!  (Megtekintve 761 alkalommal)

Jogsi rendszer hiba!!! SegitseG!
« Dátum: 2015. augusztus 28. - 18:08:24 »
0 Show voters
Mikor beszalok az autoba az elso checkpointot mutassa es a tobbit nem miert??
 
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
if(vehicleid == vizsgakocsi)
{
    if(vizsgazik[playerid] == true)
    {
      DisablePlayerCheckpoint(playerid);
      CP[playerid] = 0;
      SetPlayerCheckpoint(playerid,-1644.6655,854.2914,13.3724,3.0);
      vizsgatimer[playerid] = SetTimerEx(\"VizsgaTime\",1000,true,\"i\",playerid);
   }
   else RemovePlayerFromVehicle(playerid),SendClientMessage(playerid,RED,\"Nem fizetted ki a tanfolyamot ezért nem vizsgázhatsz!\");
}
}
public OnPlayerEnterCheckpoint(playerid)
{
switch(CP[playerid])
{
    case 0:
    {
   SetPlayerCheckpoint(playerid,-1689.9003,853.5403,24.7344,3.0);
   DisablePlayerCheckpoint(playerid);
   CP[playerid]++;
}
    case 1:
{
   SetPlayerCheckpoint(playerid,-1710.6167,883.2687,24.7422,3.0);
   DisablePlayerCheckpoint(playerid);
   CP[playerid]++;
}
case 2:
{
   SetPlayerCheckpoint(playerid,-1736.5791,944.0354,24.7422,3.0);
   DisablePlayerCheckpoint(playerid);
   CP[playerid]++;
}
case 3:
{
    SetPlayerCheckpoint(playerid,-1773.3867,943.6154,24.7422,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 4:
{
    SetPlayerCheckpoint(playerid,-1794.9808,916.4143,24.7422,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 5:
{
    SetPlayerCheckpoint(playerid,-1797.8975,865.3364,24.7500,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 6:
{
    SetPlayerCheckpoint(playerid,-1807.9396,824.3468,25.1788,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 7:
{
    SetPlayerCheckpoint(playerid,-1808.1145,743.8553,35.2308,3.0);
            DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 8:
{
    SetPlayerCheckpoint(playerid,-1735.3002,727.7364,26.0094,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 9:
{
    SetPlayerCheckpoint(playerid,-1710.8218,771.9761,24.7344,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 10:
{
    SetPlayerCheckpoint(playerid,-1710.9835,811.4437,24.7344,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 11:
{
    SetPlayerCheckpoint(playerid,-1700.3691,838.5355,24.7344,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 12:
{
    SetPlayerCheckpoint(playerid,-1643.0591,837.4599,12.7072,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 13:
{
    SetPlayerCheckpoint(playerid,-1575.7928,842.1969,7.1520,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 14:
{
    SetPlayerCheckpoint(playerid,-1578.8510,854.2066,7.2372,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 15:
{
    SetPlayerCheckpoint(playerid,-1604.9236,855.4888,7.5391,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 16:
{
    SetPlayerCheckpoint(playerid,-1616.2781,859.9451,7.6875,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 17:
{
    SetPlayerCheckpoint(playerid,-1629.9691,875.8057,8.7322,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 18:
{
    SetPlayerCheckpoint(playerid,-1629.9691,875.8057,8.7322,3.0);
    DisablePlayerCheckpoint(playerid);
    CP[playerid]++;
}
case 19:
{
   new Float:VHealth;
   GetVehicleHealth(GetPlayerVehicleID(playerid),VHealth);
   if(VHealth >= 998)
   {
       new year,month,day,hour,minute,sec;
       getdate(year,month,day);
       gettime(hour,minute,sec);
       SendClientMessage(playerid,ORANGE,\"Sikeresen Átmentél a vizsgán!\");
       CP[playerid] = -1;
       DisablePlayerCheckpoint(playerid);
      dini_IntSet(file,\"Jogsi\", PlayerInfo[playerid][Jogsi] = 1);
      vizsgazik[playerid] = false;
      SetVehicleToRespawn(vizsgakocsi);
      KillTimer(vizsgatimer[playerid]);
       vizsgatimer[playerid] = -1;
      if(!fexist(file)){
          dini_Create(file);
         format(str,sizeof(str),\"%d,%02d,%02d %02d:%02d:%02d\",year,month,day,hour,minute,sec);
         dini_Set(file,\"Név\",pName(playerid));
          dini_Set(file,\"Megkapta\",str);
      }
   }
   else
   {
       SendClientMessage(playerid,RED,\"Megbuktál!\");
       CP[playerid] = -1;
       vizsgazik[playerid] = false;
       SetVehicleToRespawn(vizsgakocsi);
       DisablePlayerCheckpoint(playerid);
       KillTimer(vizsgatimer[playerid]);
       vizsgatimer[playerid] = -1;
       dini_IntSet(file,\"Jogsi\", PlayerInfo[playerid][Jogsi] = 0);
   }
}
}
}
« Utoljára szerkesztve: 2015. augusztus 28. - 18:09:56 írta Szabi9 »

Jogsi rendszer hiba!!! SegitseG!
« Válasz #1 Dátum: 2015. augusztus 28. - 22:59:04 »
0 Show voters

case 1:
                {
                        SetPlayerCheckpoint(playerid,-1710.6167,883.2687,24.7422,3.0);
                        DisablePlayerCheckpoint(playerid);
                        CP[playerid]++;
                }

 
belépsz a cp-be és eltünteted a következőt szóval cseréld fel. Legalábbis nekem ez volt!
így nézzen ki
 
case 1:
                {
                        DisablePlayerCheckpoint(playerid);
                        SetPlayerCheckpoint(playerid,-1710.6167,883.2687,24.7422,3.0);
                        CP[playerid]++;
                }

Jogsi rendszer hiba!!! SegitseG!
« Válasz #2 Dátum: 2015. augusztus 29. - 06:05:13 »
0 Show voters
:wave:Neked igy mukodott??. Ha igen akkor nekem is kene..Megprobalom..

Jogsi rendszer hiba!!! SegitseG!
« Válasz #3 Dátum: 2015. augusztus 29. - 12:15:35 »
0 Show voters
Mert létrehozol és utána tünteted el. Pedig eltünteted létrehozol :) mint ahol elkezdted a vezetés eltüntetted és létrehoztad!

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal