[Pomoc] Gamemasteri i donatori

Započeo Blaeks, Decembar 17, 2011, 22:22:03 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim: Gta rp
Detaljan opis problema: Gledajte ovako prekopirao sam komandu /makeadmin izmenio u /makegm izmenio umesto pAdmin pGameMaster ama sve sam uradio istao to sve i za donatorske,medjutim nakom restarta ne cuva se ni donatorski gm ni obican gm mozete da mi pomognete kako da to sredim?
Dio skripte:if(strcmp(cmd, "/makegm", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristite: /makegm [playerid/PartOfName] [level(1-3)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pGameMaster] = level;
printf("[ADMIN]: %s je postavio %s na level %d admina.", sendername, giveplayer, level);
format(string, sizeof(string), "   Promovisani ste na level %d admina od strane %s", level, sendername);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), "   Promovisali ste %s na level %d admina.", giveplayer,level);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste autorizovani da bi ste Koristiteli ovu komandu!");
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): //


vlado_plavsic



Ma gledajte nije u tome sto vi mislite,vi mislite da mi je ovo prvi rad :D nije,znam ja sa ovim nego neznam zasto ne cuva

šta koristiš za čuvanje

jesi li stavio sve pod onpleyerdisconect da upisuje podatke?
Kada muškarac priča ženi bezobrazne stvari, to je seksualno uznemiravanje…
A kada žena to radi muškarcu to je 2 eura+PDV po minuti. :D



public OnPlayerDisconnect(playerid, reason)
{
gActivePlayers[playerid]--;
numplayers--;
if(reason == 0)
{
    PlayerInfo[playerid][pCrashed] = 1;
    for(new slot = 0; slot != 12; slot++)
    {
        new wep, ammo;
        GetPlayerWeaponData(playerid, slot, wep, ammo);

        if(wep != 0 && ammo != 0)
        {
            if(PlayerInfo[playerid][pGun1] == 0) { PlayerInfo[playerid][pGun1] = wep; PlayerInfo[playerid][pAmmo1] = ammo; }
            else if(PlayerInfo[playerid][pGun2] == 0) { PlayerInfo[playerid][pGun2] = wep; PlayerInfo[playerid][pAmmo2] = ammo; }
            else if(PlayerInfo[playerid][pGun3] == 0) { PlayerInfo[playerid][pGun3] = wep; PlayerInfo[playerid][pAmmo3] = ammo; }
            else if(PlayerInfo[playerid][pGun4] == 0) { PlayerInfo[playerid][pGun4] = wep; PlayerInfo[playerid][pAmmo4] = ammo; }
        }
    }
}
OnPlayerUpdate(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
        if(TaxiAccepted[i] < 999)
        {
        if(TaxiAccepted[i] == playerid)
        {
            TaxiAccepted[i] = 999;
            GameTextForPlayer(i, "~w~Pozivac Taxi-a~n~~r~Napustio server", 5000, 1);
            TaxiCallTime[i] = 0;
            DisablePlayerCheckpoint(i);
        }
        }
        else if(BusAccepted[i] < 999)
        {
        if(BusAccepted[i] == playerid)
        {
            BusAccepted[i] = 999;
            GameTextForPlayer(i, "~w~Pozivac autobusa~n~~r~Napustio server", 5000, 1);
            BusCallTime[i] = 0;
            DisablePlayerCheckpoint(i);
        }
        }
    }
}
if (GetPlayerVehicleID(playerid) == 131) SetVehicleToRespawn(131);
OnPlayerUpdate(playerid);
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
{
    if(IsPlayerConnected(TransportDriver[playerid]))
{
    new string[64];
    TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
    TransportTime[TransportDriver[playerid]] = 0;
    TransportCost[TransportDriver[playerid]] = 0;
    format(string, sizeof(string), "~w~Putnik izasao~n~~g~Zarada $%d",TransportCost[playerid]);
    GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
}
}
if(GotHit[playerid] > 0)
{
    if(GetChased[playerid] < 999)
    {
        if(IsPlayerConnected(GetChased[playerid]))
        {
        SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Vas putnik je napustio server.");
            GoChase[GetChased[playerid]] = 999;
}
    }
}
if(PlayerPaintballing[playerid] != 0)
{
    PaintballPlayers --;
}
if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
{
    KartingPlayers --;
}
if(PlayersChannel[playerid] < 999)
{
IRCInfo[PlayersChannel[playerid]][iPlayers] -= 1;
}
if(HireCar[playerid] != 299)
{
gLastDriver[HireCar[playerid]] = 300;
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
if(reason != 0)
{
SetVehicleToRespawn(HireCar[playerid]);
}
}
if(GangCar[playerid] != 512)
{
gLastDriver[GangCar[playerid]] = 520;
gCarLock[GangCar[playerid]] = 0;
UnLockCar(GangCar[playerid]);
}
if (gLastCar[playerid] > 0)
{
gLastDriver[gLastCar[playerid]] = 300;
if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
{
gCarLock[gLastCar[playerid]] = 0;
UnLockCar(gLastCar[playerid]);
}
}
if(PlayerBoxing[playerid] > 0)
{
    if(Boxer1 == playerid)
    {
        if(IsPlayerConnected(Boxer2))
        {
        PlayerBoxing[Boxer2] = 0;
        SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
        SetPlayerInterior(Boxer2, 5);
        PlayerInfo[Boxer2][pInt] = 5;
        GameTextForPlayer(Boxer2, "~r~Match interupted", 5000, 1);
}
    }
    else if(Boxer2 == playerid)
    {
        if(IsPlayerConnected(Boxer1))
        {
        PlayerBoxing[Boxer1] = 0;
        SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
        SetPlayerInterior(Boxer1, 5);
        PlayerInfo[Boxer2][pInt] = 5;
        GameTextForPlayer(Boxer1, "~r~Match interupted", 5000, 1);
}
    }
    InRing = 0;
      RoundStarted = 0;
Boxer1 = 255;
Boxer2 = 255;
TBoxer = 255;
}
    if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
    else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
if(PlayerInfo[playerid][pJob] == 11)
{
    if(JobDuty[playerid] == 1) { Medics -= 1; }
}
else if(PlayerInfo[playerid][pJob] == 7)
{
    if(JobDuty[playerid] == 1) { Mechanics -= 1; }
}
else if(PlayerInfo[playerid][pJob] == 17)
{
if(JobDuty[playerid] == 1) { PizzaBoys -= 1; }
}
if (PlayerInfo[playerid][pRoadblock] != 0)
{
RemoveRoadblock(playerid);
}
BusrouteEast[playerid][0] = 0;
BusrouteWest[playerid][0] = 0;
return 1;
}

public GateClose(playerid)
{
      MoveDynamicObject(pdgate1,1589.053344,-1638.123168,14.122960, 0.97);
      PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
      return 1;
}

public GateClose2()
{
      MoveDynamicObject(armygate1,2720.3772, -2409.7523, 12.6, 2.5);
      MoveDynamicObject(armygate2,2720.3772, -2508.3069, 12.6, 2.5);
      return 1;
}

public GateClose3()
{
      MoveDynamicObject(fbigate, 1534.9020,-1451.5979,14.4882, 1.5);
      return 1;
}

public GateClose4()
{
      MoveDynamicObject(hspdgate, 1643.3379,-1714.9338,15.3067, 1.5);
      return 1;
}

public GateClose5()
{
      DestroyDynamicObject( pdgate3 );
      pdgate2 = CreateDynamicObject(968,1544.70031700,-1630.73571700,13.09698000,-1.00000000,-91.00000000,269.97286900); //
      return 1;
}

public GateClose6()
{
      MoveDynamicObject(lucianogate, 1246.0033,-767.3727,91.1473, 1.5);
  return 1;
}

public elevator1(playerid)
{
      SetPlayerPos(playerid,1174.9591,-1374.8761,23.9736);
      return 1;
}

public elevator2(playerid)
{
      SetPlayerPos(playerid,1174.9100,-1361.7330,13.9876);
  return 1;
}

Citat: Blaeks_Biofor poslato Decembar 18, 2011, 09:23:29 PRE PODNE
public OnPlayerDisconnect(playerid, reason)
{
gActivePlayers[playerid]--;
numplayers--;
if(reason == 0)
{
    PlayerInfo[playerid][pCrashed] = 1;
    for(new slot = 0; slot != 12; slot++)
    {
        new wep, ammo;
        GetPlayerWeaponData(playerid, slot, wep, ammo);

        if(wep != 0 && ammo != 0)
        {
            if(PlayerInfo[playerid][pGun1] == 0) { PlayerInfo[playerid][pGun1] = wep; PlayerInfo[playerid][pAmmo1] = ammo; }
            else if(PlayerInfo[playerid][pGun2] == 0) { PlayerInfo[playerid][pGun2] = wep; PlayerInfo[playerid][pAmmo2] = ammo; }
            else if(PlayerInfo[playerid][pGun3] == 0) { PlayerInfo[playerid][pGun3] = wep; PlayerInfo[playerid][pAmmo3] = ammo; }
            else if(PlayerInfo[playerid][pGun4] == 0) { PlayerInfo[playerid][pGun4] = wep; PlayerInfo[playerid][pAmmo4] = ammo; }
        }
    }
}
OnPlayerUpdate(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
        if(TaxiAccepted[i] < 999)
        {
        if(TaxiAccepted[i] == playerid)
        {
            TaxiAccepted[i] = 999;
            GameTextForPlayer(i, "~w~Pozivac Taxi-a~n~~r~Napustio server", 5000, 1);
            TaxiCallTime[i] = 0;
            DisablePlayerCheckpoint(i);
        }
        }
        else if(BusAccepted[i] < 999)
        {
        if(BusAccepted[i] == playerid)
        {
            BusAccepted[i] = 999;
            GameTextForPlayer(i, "~w~Pozivac autobusa~n~~r~Napustio server", 5000, 1);
            BusCallTime[i] = 0;
            DisablePlayerCheckpoint(i);
        }
        }
    }
}
if (GetPlayerVehicleID(playerid) == 131) SetVehicleToRespawn(131);
OnPlayerUpdate(playerid);
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
{
    if(IsPlayerConnected(TransportDriver[playerid]))
{
    new string[64];
    TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
    TransportTime[TransportDriver[playerid]] = 0;
    TransportCost[TransportDriver[playerid]] = 0;
    format(string, sizeof(string), "~w~Putnik izasao~n~~g~Zarada $%d",TransportCost[playerid]);
    GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
}
}
if(GotHit[playerid] > 0)
{
    if(GetChased[playerid] < 999)
    {
        if(IsPlayerConnected(GetChased[playerid]))
        {
        SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Vas putnik je napustio server.");
            GoChase[GetChased[playerid]] = 999;
}
    }
}
if(PlayerPaintballing[playerid] != 0)
{
    PaintballPlayers --;
}
if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
{
    KartingPlayers --;
}
if(PlayersChannel[playerid] < 999)
{
IRCInfo[PlayersChannel[playerid]][iPlayers] -= 1;
}
if(HireCar[playerid] != 299)
{
gLastDriver[HireCar[playerid]] = 300;
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
if(reason != 0)
{
SetVehicleToRespawn(HireCar[playerid]);
}
}
if(GangCar[playerid] != 512)
{
gLastDriver[GangCar[playerid]] = 520;
gCarLock[GangCar[playerid]] = 0;
UnLockCar(GangCar[playerid]);
}
if (gLastCar[playerid] > 0)
{
gLastDriver[gLastCar[playerid]] = 300;
if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
{
gCarLock[gLastCar[playerid]] = 0;
UnLockCar(gLastCar[playerid]);
}
}
if(PlayerBoxing[playerid] > 0)
{
    if(Boxer1 == playerid)
    {
        if(IsPlayerConnected(Boxer2))
        {
        PlayerBoxing[Boxer2] = 0;
        SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
        SetPlayerInterior(Boxer2, 5);
        PlayerInfo[Boxer2][pInt] = 5;
        GameTextForPlayer(Boxer2, "~r~Match interupted", 5000, 1);
}
    }
    else if(Boxer2 == playerid)
    {
        if(IsPlayerConnected(Boxer1))
        {
        PlayerBoxing[Boxer1] = 0;
        SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
        SetPlayerInterior(Boxer1, 5);
        PlayerInfo[Boxer2][pInt] = 5;
        GameTextForPlayer(Boxer1, "~r~Match interupted", 5000, 1);
}
    }
    InRing = 0;
      RoundStarted = 0;
Boxer1 = 255;
Boxer2 = 255;
TBoxer = 255;
}
    if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
    else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
if(PlayerInfo[playerid][pJob] == 11)
{
    if(JobDuty[playerid] == 1) { Medics -= 1; }
}
else if(PlayerInfo[playerid][pJob] == 7)
{
    if(JobDuty[playerid] == 1) { Mechanics -= 1; }
}
else if(PlayerInfo[playerid][pJob] == 17)
{
if(JobDuty[playerid] == 1) { PizzaBoys -= 1; }
}
if (PlayerInfo[playerid][pRoadblock] != 0)
{
RemoveRoadblock(playerid);
}
BusrouteEast[playerid][0] = 0;
BusrouteWest[playerid][0] = 0;
return 1;
}

public GateClose(playerid)
{
      MoveDynamicObject(pdgate1,1589.053344,-1638.123168,14.122960, 0.97);
      PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
      return 1;
}

public GateClose2()
{
      MoveDynamicObject(armygate1,2720.3772, -2409.7523, 12.6, 2.5);
      MoveDynamicObject(armygate2,2720.3772, -2508.3069, 12.6, 2.5);
      return 1;
}

public GateClose3()
{
      MoveDynamicObject(fbigate, 1534.9020,-1451.5979,14.4882, 1.5);
      return 1;
}

public GateClose4()
{
      MoveDynamicObject(hspdgate, 1643.3379,-1714.9338,15.3067, 1.5);
      return 1;
}

public GateClose5()
{
      DestroyDynamicObject( pdgate3 );
      pdgate2 = CreateDynamicObject(968,1544.70031700,-1630.73571700,13.09698000,-1.00000000,-91.00000000,269.97286900); //
      return 1;
}

public GateClose6()
{
      MoveDynamicObject(lucianogate, 1246.0033,-767.3727,91.1473, 1.5);
  return 1;
}

public elevator1(playerid)
{
      SetPlayerPos(playerid,1174.9591,-1374.8761,23.9736);
      return 1;
}

public elevator2(playerid)
{
      SetPlayerPos(playerid,1174.9100,-1361.7330,13.9876);
  return 1;
}

Rekao sam ti na pm,pod onplayerregister i onplayerupdate callback stavi da ti save-a ...:) Dao sam ti i primer !