[POMOC] Vredi pogledat

Započeo Danisha, Novembar 21, 2012, 17:23:28 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:moja
Detaljan opis problema:e ovako cesto mi se desi da dodjem u ammu i nema mi crvenog check pointa za treniranje pa sam ja sada uradio komandu /traingun da kada si u ammu to kucas i treniras ali sada ima jedan problem tu kada igrac za redom kucaj /traingun u ammu i izabere oruzje on dvaput vjezba od jednom jasnije dobije dva skila za jedno treniranje a cak mozes i tri i sada ja sam postavljo i timer ali nevredi ko zna da mi to popravi dacu dole komandu
Dio skripte:
CMD:traingun(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
        new string[128];
if(IsPlayerInRangeOfPoint(playerid,5,300.5705,-134.0464,1004.0625))
        {
            if(PlayerInfo[playerid][pGunLic] == 0)
    {
    SCM(playerid, COLOR_WHITE, "Nemate dozvolu za oruzja,ne mozete trenirati");
    return 1;
    }
            if(JustReported[playerid] == 1)
    {
    SCM(playerid, COLOR_WHITE, "Gde si poso [cenzura]cino da treniras prekoreda?? ");
    return 1;
    }
            if(PlayerInfo[playerid][pAmmuTrainTime] == 0)
        {
            new listitems[] = "1\tIzaberite oruzje\n2\tObican Pistolj\n3\tPistolj sa prigusivacem\n4\tDesert Deagle\n5\tPumparica\n6\tKratez\n7\tAutomatska pumparica\n8\tTEC9 / MAC 10\n9\tHekler MP5\n10\tAK-47\n11\tM4"
        ShowPlayerDialog(playerid,0,2,"Za koje oruzje zelite da povecate skill? Cena(100$)",listitems,"Treniraj","Odustani");
        SetTimerEx("ReportReset", 80000, false, "i", playerid);
        JustReported[playerid] = 1;
            return 1;
        }
        else
        {
            format(string, sizeof(string), "ERROR: Morate sacekati %d pre nego sto pocne trening",PlayerInfo[playerid][pAmmuTrainTime]);
        SCM(playerid, COLOR_GREY, string);
        return 1;
}
    }
    else
{
SCM(playerid, COLOR_WHITE, "Niste u AmmuNationu!");
}
return 1;
    }
    return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):////
Poslednja Izmena: Novembar 21, 2012, 17:24:06 POSLE PODNE od Danisha


fDialog(0) // Ammunation
{
if(response)
{
if(listitem == 1)
{
if(GetPlayerMoney(playerid) > 49)
{
if(PlayerInfo[playerid][pPistSkill] < 1000)
{
TogglePlayerControllable(playerid, 0);
SCM(playerid, COLOR_GREY, "TRENER: Za nekoliko sekundi pocinje tening za pistolj");
TrainTimer[playerid] = SetTimerEx("TrainPistol", 2500, false, "i", playerid);
SafeGivePlayerMoney(playerid, - 100);
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Vec imate Expert level za ovo oruzje!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Nemate dovoljno novca!");
return 1;
}
}
else if(listitem == 2)
{
if(GetPlayerMoney(playerid) > 75)
{
if(PlayerInfo[playerid][pSilenSkill] < 1000)
{
TogglePlayerControllable(playerid, 0);
SCM(playerid, COLOR_GREY, "TRENER: Za nekoliko sekundi pocinje tening za pistolj sa prigusivacem");
TrainTimer[playerid] = SetTimerEx("TrainSilenced", 2500, false, "i", playerid);
SafeGivePlayerMoney(playerid, - 100);
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Vec imate Expert level za ovo oruzje!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Nemate dovoljno novca!");
return 1;
}
}
else if(listitem == 3)
{
if(GetPlayerMoney(playerid) > 150)
{
if(PlayerInfo[playerid][pDesertSkill] < 1000)
{
TogglePlayerControllable(playerid, 0);
SCM(playerid, COLOR_GREY, "TRENER: Za nekoliko sekundi pocinje tening za dezert");
TrainTimer[playerid] = SetTimerEx("TrainDeagle", 2500, false, "i", playerid);
SafeGivePlayerMoney(playerid, - 100);
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Vec imate Expert level za ovo oruzje!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Nemate dovoljno novca!");
return 1;
}
}
else if(listitem == 4)
{
if(GetPlayerMoney(playerid) > 125)
{
if(PlayerInfo[playerid][pShotgSkill] < 1000)
{
TogglePlayerControllable(playerid, 0);
SCM(playerid, COLOR_GREY, "TRENER: Za nekoliko sekundi pocinje tening za pumparicu");
TrainTimer[playerid] = SetTimerEx("TrainShotgun", 2500, false, "i", playerid);
SafeGivePlayerMoney(playerid, - 100);
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Vec imate Expert level za ovo oruzje!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Nemate dovoljno novca!");
return 1;
}
}
else if(listitem == 5)
{
if(GetPlayerMoney(playerid) > 100)
{
if(PlayerInfo[playerid][pSawnSkill] < 0)
{
TogglePlayerControllable(playerid, 0);
SCM(playerid, COLOR_GREY, "TRENER: Za nekoliko sekundi pocinje tening za -kratez-");
TrainTimer[playerid] = SetTimerEx("TrainSawn", 2500, false, "i", playerid);
SafeGivePlayerMoney(playerid, - 100);
}
else
{
SCM(playerid, COLOR_WHITE, "Za ovo oruzje nije moguce trenirati u AmmuNationu!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Nemate dovoljno novca!");
return 1;
}
}
else if(listitem == 6)
{
if(GetPlayerMoney(playerid) > 200)
{
if(PlayerInfo[playerid][pCombSkill] < 1000)
{
TogglePlayerControllable(playerid, 0);
SCM(playerid, COLOR_GREY, "TRENER: Za nekoliko sekundi pocinje tening za automatsku pumparicu");
TrainTimer[playerid] = SetTimerEx("TrainCombat", 2500, false, "i", playerid);
SafeGivePlayerMoney(playerid, - 100);
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Vec imate Expert level za ovo oruzje!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Nemate dovoljno novca!");
return 1;
}
}
else if(listitem == 7)
{
if(GetPlayerMoney(playerid) > 125)
{
if(PlayerInfo[playerid][pUziSkill] < 800)
{
TogglePlayerControllable(playerid, 0);
SCM(playerid, COLOR_GREY, "TRENER: Za nekoliko sekundi pocinje tening za uzi");
TrainTimer[playerid] = SetTimerEx("TrainUzi", 2500, false, "i", playerid);
SafeGivePlayerMoney(playerid, - 100);
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Vec imate Expert level za ovo oruzje!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Nemate dovoljno novca!");
return 1;
}
}
else if(listitem == 8)
{
if(GetPlayerMoney(playerid) > 155)
{
if(PlayerInfo[playerid][pSmgSkill] < 1000)
{
TogglePlayerControllable(playerid, 0);
SCM(playerid, COLOR_GREY, "TRENER: Za nekoliko sekundi pocinje tening za hekler");
TrainTimer[playerid] = SetTimerEx("TrainSmg", 2500, false, "i", playerid);
SafeGivePlayerMoney(playerid, - 100);
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Vec imate Expert level za ovo oruzje!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Nemate dovoljno novca!");
return 1;
}
}
else if(listitem == 9)
{
if(GetPlayerMoney(playerid) > 140)
{
if(PlayerInfo[playerid][pAkSkill] < 1000)
{
TogglePlayerControllable(playerid, 0);
SCM(playerid, COLOR_GREY, "TRENER: Za nekoliko sekundi pocinje tening za kalasnjikov");
TrainTimer[playerid] = SetTimerEx("TrainAk47", 2500, false, "i", playerid);
SafeGivePlayerMoney(playerid, - 100);
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Vec imate Expert level za ovo oruzje!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Nemate dovoljno novca!");
return 1;
}
}
else if(listitem == 10)
{
if(GetPlayerMoney(playerid) > 140)
{
if(PlayerInfo[playerid][pM4Skill] < 1000)
{
TogglePlayerControllable(playerid, 0);
SCM(playerid, COLOR_GREY, "TRENER: Za nekoliko sekundi pocinje tening za M4A1");
TrainTimer[playerid] = SetTimerEx("TrainM4", 2500, false, "i", playerid);
SafeGivePlayerMoney(playerid, - 100);
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Vec imate Expert level za ovo oruzje!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, "TRENER: Nemate dovoljno novca!");
return 1;
}
}
}
else
{
SCM(playerid, 0xFFFFFFFF, "Otkazali ste");
}
return 1;
}


public TrainPistol(playerid)
{
    if(Training[playerid] == 0)
{
SafeGivePlayerWeapon(playerid, 22, 120);
TogglePlayerControllable(playerid, 0);
SafeSetPlayerPos(playerid, 300.0852,-138.6679,1004.0625);
SetPlayerFacingAngle(playerid, 93.0408);
SetPlayerCameraPos(playerid, 291.9852,-142.1770,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0852,-138.6679,1004.0625);
ApplyAnimation(playerid,"COLT45","colt45_fire",4.0,1,1,1,1,10000);
TrainTimer[playerid] = SetTimerEx("TrainPistol", 10000, false, "i", playerid);
Training[playerid] = 1;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~p~Trening... ~n~~l~] ] ]",10000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 1)
{
    SetPlayerCameraPos(playerid, 283.6527,-132.6680,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0852,-138.6679,1004.0625);
ApplyAnimation(playerid,"COLT45","colt45_crouchfire",4.0,1,1,1,1,25000);
TrainTimer[playerid] = SetTimerEx("TrainPistol", 25000, false, "i", playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~p~Trening... ~n~~b~] ~l~] ]",25000,3);
        Training[playerid] = 2;
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 2)
{
SetPlayerCameraPos(playerid, 276.2324,-143.4495,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0852,-138.6679,1004.0625);
ApplyAnimation(playerid,"COLT45","colt45_fire",4.0,1,1,1,1,40000);
TrainTimer[playerid] = SetTimerEx("TrainPistol", 40000, false, "i", playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~p~Trening... ~n~~b~] ] ~l~]",40000,3);
        Training[playerid] = 3;
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 3)
{
    SetCameraBehindPlayer(playerid);
ClearAnimations(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pPistSkill] += 40;
PlayerInfo[playerid][pAmmuTrainTime] = 900;
SafeGivePlayerMoney(playerid, -50);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~p~Trening Zavrsen! ~n~~b~] ] ]",8000,3);
SCM(playerid, COLOR_GREY, "* Vas Colt45 Trening je uspesno Zavrsen, Vas skill je sada za 40+ veci");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, 1056,X,Y,Z);
SetPlayerSkills(playerid);
Training[playerid] = 0;
SafeResetPlayerWeapons(playerid);
PlayerInfo[playerid][pWeaponReset] = 0;
}
return 1;
}

public TrainSilenced(playerid)
{
    if(Training[playerid] == 0)
{
SafeGivePlayerWeapon(playerid, 23, 120);
TogglePlayerControllable(playerid, 0);
SafeSetPlayerPos(playerid, 300.0852,-138.6679,1004.0625);
SetPlayerFacingAngle(playerid, 93.0408);
SetPlayerCameraPos(playerid, 291.9852,-142.1770,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0852,-138.6679,1004.0625);
ApplyAnimation(playerid,"SILENCED","Silence_fire",4.0,1,1,1,1,12500);
TrainTimer[playerid] = SetTimerEx("TrainSilenced", 12500, false, "i", playerid);
Training[playerid] = 1;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening... ~n~~l~] ] ]",12500,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 1)
{
SetPlayerCameraPos(playerid, 283.6527,-132.6680,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0852,-138.6679,1004.0625);
ApplyAnimation(playerid,"SILENCED","SilenceCrouchfire",4.0,1,1,1,1,27500);
TrainTimer[playerid] = SetTimerEx("TrainSilenced", 27500, false, "i", playerid);
Training[playerid] = 2;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening... ~n~~r~] ~l~] ]",27500,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 2)
{
    SetPlayerCameraPos(playerid, 276.2324,-143.4495,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0852,-138.6679,1004.0625);
ApplyAnimation(playerid,"SILENCED","Silence_fire",4.0,1,1,1,1,40000);
TrainTimer[playerid] = SetTimerEx("TrainSilenced", 42500, false, "i", playerid);
Training[playerid] = 3;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening... ~n~~r~] ] ~l~]",42500,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 3)
{
    SetCameraBehindPlayer(playerid);
ClearAnimations(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pSilenSkill] += 45;
PlayerInfo[playerid][pAmmuTrainTime] = 1020;
SafeGivePlayerMoney(playerid, -75);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening Zavrsen! ~n~~r~] ] ]",8000,3);
SCM(playerid, COLOR_GREY, "* Vas Silenced Trening je uspesno Zavrsen, Vas skill je sada za 45+ Higher");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, 1056,X,Y,Z);
SetPlayerSkills(playerid);
Training[playerid] = 0;
SafeResetPlayerWeapons(playerid);
PlayerInfo[playerid][pWeaponReset] = 0;
}
return 1;
}

public TrainDeagle(playerid)
{
    if(Training[playerid] == 0)
{
SafeGivePlayerWeapon(playerid, 24, 120);
TogglePlayerControllable(playerid, 0);
SafeSetPlayerPos(playerid, 300.0852,-138.6679,1004.0625);
SetPlayerFacingAngle(playerid, 93.0408);
SetPlayerCameraPos(playerid, 291.9852,-142.1770,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0852,-138.6679,1004.0625);
ApplyAnimation(playerid,"SILENCED","Silence_fire",4.0,1,1,1,1,10000);
TrainTimer[playerid] = SetTimerEx("TrainDeagle", 20000, false, "i", playerid);
Training[playerid] = 1;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~Trening... ~n~~l~] ] ]",50000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 1)
{
    SetPlayerCameraPos(playerid, 283.6527,-132.6680,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0852,-138.6679,1004.0625);
ApplyAnimation(playerid,"SILENCED","SilenceCrouchfire",4.0,1,1,1,1,35000);
TrainTimer[playerid] = SetTimerEx("TrainDeagle", 35000, false, "i", playerid);
Training[playerid] = 2;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~Trening... ~n~~g~] ~l~] ]",35000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 2)
{
    SetPlayerCameraPos(playerid, 276.2324,-143.4495,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0852,-138.6679,1004.0625);
ApplyAnimation(playerid,"SILENCED","Silence_fire",4.0,1,1,1,1,50000);
TrainTimer[playerid] = SetTimerEx("TrainDeagle", 50000, false, "i", playerid);
Training[playerid] = 3;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~Trening... ~n~~g~] ] ~l~]",50000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 3)
{
    SetCameraBehindPlayer(playerid);
ClearAnimations(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pDesertSkill] += 40;
PlayerInfo[playerid][pAmmuTrainTime] = 1800;
SafeGivePlayerMoney(playerid, -150);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~Trening Zavrsen! ~n~~g~] ] ]",8000,3);
SCM(playerid, COLOR_GREY, "* Vas SawnOff Trening je uspesno Zavrsen, Vas skill je sada za 40+ veci");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, 1056,X,Y,Z);
SetPlayerSkills(playerid);
Training[playerid] = 0;
SafeResetPlayerWeapons(playerid);
PlayerInfo[playerid][pWeaponReset] = 0;
}
return 1;
}


public TrainShotgun(playerid)
{
    if(Training[playerid] == 0)
{
SafeGivePlayerWeapon(playerid, 25, 120);
TogglePlayerControllable(playerid, 0);
SafeSetPlayerPos(playerid, 300.0769,-135.4943,1004.0625);
SetPlayerFacingAngle(playerid, 93.0408);
SetPlayerCameraPos(playerid, 293.3577,-138.0434,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0769,-135.4943,1004.0625);
ApplyAnimation(playerid,"SHOTGUN","shotgun_fire_poor",4.0,1,1,1,1,VEHICLE_RESPAWN);
TrainTimer[playerid] = SetTimerEx("TrainShotgun", 30000, false, "i", playerid);
Training[playerid] = 1;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Trening... ~n~~l~] ] ]",30000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 1)
{
    SetPlayerCameraPos(playerid, 290.8734,-129.9989,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0769,-135.4943,1004.0625);
ApplyAnimation(playerid,"SHOTGUN","shotgun_crouchfire",4.0,1,1,1,1,50000);
TrainTimer[playerid] = SetTimerEx("TrainShotgun", 50000, false, "i", playerid);
Training[playerid] = 2;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Trening... ~n~~p~] ~l~] ]",50000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 2)
{
    SetPlayerCameraPos(playerid, 284.3435,-134.9429,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0769,-135.4943,1004.0625);
ApplyAnimation(playerid,"SHOTGUN","shotgun_fire",4.0,1,1,1,1,65000);
TrainTimer[playerid] = SetTimerEx("TrainShotgun", 65000, false, "i", playerid);
Training[playerid] = 3;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Trening... ~n~~p~] ] ~l~]",65000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 3)
{
    SetCameraBehindPlayer(playerid);
ClearAnimations(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pShotgSkill] += 30;
PlayerInfo[playerid][pAmmuTrainTime] = 900;
SafeGivePlayerMoney(playerid, -125);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~Trening Zavrsen! ~n~~g~] ] ]",8000,3);
SCM(playerid, COLOR_GREY, "* Vas Shotgun Trening je uspesno Zavrsen, Vas skill je sada za 30+ Higher");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, 1056,X,Y,Z);
SetPlayerSkills(playerid);
Training[playerid] = 0;
SafeResetPlayerWeapons(playerid);
PlayerInfo[playerid][pWeaponReset] = 0;
}
return 1;
}




public TrainSawn(playerid)
{
    if(Training[playerid] == 0)
{
SafeGivePlayerWeapon(playerid, 26, 120);
TogglePlayerControllable(playerid, 0);
SafeSetPlayerPos(playerid, 300.0769,-135.4943,1004.0625);
SetPlayerFacingAngle(playerid, 93.0408);
SetPlayerCameraPos(playerid, 293.3577,-138.0434,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0769,-135.4943,1004.0625);
ApplyAnimation(playerid,"COLT45","colt45_fire",4.0,1,1,1,1,20000);
TrainTimer[playerid] = SetTimerEx("TrainSawn", 20000, false, "i", playerid);
Training[playerid] = 1;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~Trening... ~n~~l~] ] ]",20000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 1)
{
    SetPlayerCameraPos(playerid, 290.8734,-129.9989,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0769,-135.4943,1004.0625);
ApplyAnimation(playerid,"COLT45","colt45_crouchfire",4.0,1,1,1,1,VEHICLE_RESPAWN);
TrainTimer[playerid] = SetTimerEx("TrainSawn", 30000, false, "i", playerid);
Training[playerid] = 2;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~Trening... ~n~~r~] ~l~] ]",30000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 2)
{
    SetPlayerCameraPos(playerid, 284.3435,-134.9429,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0769,-135.4943,1004.0625);
ApplyAnimation(playerid,"COLT45","colt45_fire",4.0,1,1,1,1,45000);
TrainTimer[playerid] = SetTimerEx("TrainSawn", 45000, false, "i", playerid);
Training[playerid] = 3;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~Trening... ~n~~r~] ] ~l~]",45000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 3)
{
    SetCameraBehindPlayer(playerid);
ClearAnimations(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pShotgSkill] += 30;
PlayerInfo[playerid][pAmmuTrainTime] = 900;
SafeGivePlayerMoney(playerid, -100);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~Trening Zavrsen! ~n~~r~] ] ]",8000,3);
SCM(playerid, COLOR_GREY, "* Vas SawnOff Trening je uspesno Zavrsen, Vas skill je sada za 30+ Higher");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, 1056,X,Y,Z);
SetPlayerSkills(playerid);
Training[playerid] = 0;
SafeResetPlayerWeapons(playerid);
PlayerInfo[playerid][pWeaponReset] = 0;
}
return 1;
}

public TrainCombat(playerid)
{
    if(Training[playerid] == 0)
{
SafeGivePlayerWeapon(playerid, 27, 120);
TogglePlayerControllable(playerid, 0);
SafeSetPlayerPos(playerid, 300.0769,-135.4943,1004.0625);
SetPlayerFacingAngle(playerid, 93.0408);
SetPlayerCameraPos(playerid, 293.3577,-138.0434,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0769,-135.4943,1004.0625);
ApplyAnimation(playerid,"SHOTGUN","shotgun_fire_poor",4.0,1,1,1,1,40000);
TrainTimer[playerid] = SetTimerEx("TrainCombat", 40000, false, "i", playerid);
Training[playerid] = 1;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening... ~n~~l~] ] ]",40000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 1)
{
    SetPlayerCameraPos(playerid, 290.8734,-129.9989,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0769,-135.4943,1004.0625);
ApplyAnimation(playerid,"SHOTGUN","shotgun_fire_poor",4.0,1,1,1,1,60000);
TrainTimer[playerid] = SetTimerEx("TrainCombat", 60000, false, "i", playerid);
Training[playerid] = 2;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening... ~n~~w~] ~l~] ]",60000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 2)
{
    SetPlayerCameraPos(playerid, 284.3435,-134.9429,1004.0625);
SetPlayerCameraLookAt(playerid, 300.0769,-135.4943,1004.0625);
ApplyAnimation(playerid,"SHOTGUN","shotgun_fire_poor",4.0,1,1,1,1,80000);
TrainTimer[playerid] = SetTimerEx("TrainCombat", 80000, false, "i", playerid);
Training[playerid] = 3;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening... ~n~~w~] ] ~l~]",80000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 3)
{
SetCameraBehindPlayer(playerid);
ClearAnimations(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pCombSkill] += 40;
PlayerInfo[playerid][pAmmuTrainTime] = 1800;
SafeGivePlayerMoney(playerid, -200);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening Zavrsen! ~n~~w~] ] ]",8000,3);
SCM(playerid, COLOR_GREY, "* Vas Combat Shotgun Trening je uspesno Zavrsen, Vas skill je sada za 40+ veci");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, 1056,X,Y,Z);
SetPlayerSkills(playerid);
Training[playerid] = 0;
SafeResetPlayerWeapons(playerid);
PlayerInfo[playerid][pWeaponReset] = 0;
}
return 1;
}

public TrainSmg(playerid)
{
if(Training[playerid] == 0)
{
SafeGivePlayerWeapon(playerid, 29, 120);
TogglePlayerControllable(playerid, 0);
SafeSetPlayerPos(playerid, 300.3768,-136.9973,1004.0625);
SetPlayerFacingAngle(playerid, 93.0408);
SetPlayerCameraPos(playerid, 283.8521,-138.2618,1004.0625);
SetPlayerCameraLookAt(playerid, 300.3768,-136.9973,1004.0625);
ApplyAnimation(playerid,"RIFLE","RIFLE_fire_poor",4.0,1,1,1,1,40000);
TrainTimer[playerid] = SetTimerEx("TrainSmg", 40000, false, "i", playerid);
Training[playerid] = 1;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~Trening... ~n~~l~] ] ]",40000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 1)
{
        SetPlayerCameraPos(playerid, 284.4362,-127.4147,1004.0625);
SetPlayerCameraLookAt(playerid, 300.3768,-136.9973,1004.0625);
ApplyAnimation(playerid,"RIFLE","RIFLE_fire",4.0,1,1,1,1,45000);
TrainTimer[playerid] = SetTimerEx("TrainSmg", 45000, false, "i", playerid);
Training[playerid] = 2;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~Trening... ~n~~b~] ~l~] ]",45000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 2)
{
    SetPlayerCameraPos(playerid, 291.9695,-139.5157,1004.0625);
SetPlayerCameraLookAt(playerid, 300.3768,-136.9973,1004.0625);
ApplyAnimation(playerid,"RIFLE","RIFLE_crouchfire",4.0,1,1,1,1,55000);
TrainTimer[playerid] = SetTimerEx("TrainSmg", 55000, false, "i", playerid);
Training[playerid] = 3;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~Trening... ~n~~b~] ] ~l~]",55000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 3)
{
    SetCameraBehindPlayer(playerid);
ClearAnimations(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pSmgSkill] += 40;
PlayerInfo[playerid][pAmmuTrainTime] = 1200;
SafeGivePlayerMoney(playerid, -155);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~Trening Zavrsen! ~n~~b~] ] ]",8000,3);
SCM(playerid, COLOR_GREY, "* Vas SMG Trening je uspesno Zavrsen, Vas skill je sada za 40+ veci");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, 1056,X,Y,Z);
SetPlayerSkills(playerid);
Training[playerid] = 0;
SafeResetPlayerWeapons(playerid);
PlayerInfo[playerid][pWeaponReset] = 0;
}
return 1;
}

public TrainUzi(playerid)
{
if(Training[playerid] == 0)
{
SafeGivePlayerWeapon(playerid, 28, 120);
TogglePlayerControllable(playerid, 0);
SafeSetPlayerPos(playerid, 300.3768,-136.9973,1004.0625);
SetPlayerFacingAngle(playerid, 93.0408);
SetPlayerCameraPos(playerid, 283.8521,-138.2618,1004.0625);
SetPlayerCameraLookAt(playerid, 300.3768,-136.9973,1004.0625);
ApplyAnimation(playerid,"UZI","UZI_fire_poor",4.0,1,1,1,1,40000);
TrainTimer[playerid] = SetTimerEx("TrainUzi", 40000, false, "i", playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~Trening... ~n~~l~] ] ]",40000,3);
Training[playerid] = 1;
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 1)
{
    SetPlayerCameraPos(playerid, 284.4362,-127.4147,1004.0625);
SetPlayerCameraLookAt(playerid, 300.3768,-136.9973,1004.0625);
ApplyAnimation(playerid,"UZI","UZI_fire",4.0,1,1,1,1,45000);
TrainTimer[playerid] = SetTimerEx("TrainUzi", 45000, false, "i", playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~Trening... ~n~~b~] ~l~] ]",45000,3);
Training[playerid] = 2;
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 2)
{
    SetPlayerCameraPos(playerid, 291.9695,-139.5157,1004.0625);
SetPlayerCameraLookAt(playerid, 300.3768,-136.9973,1004.0625);
ApplyAnimation(playerid,"UZI","UZI_crouchfire",4.0,1,1,1,1,55000);
TrainTimer[playerid] = SetTimerEx("TrainUzi", 55000, false, "i", playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~Trening... ~n~~b~] ] ~l~]",55000,3);
Training[playerid] = 3;
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 3)
{
    SetCameraBehindPlayer(playerid);
ClearAnimations(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pUziSkill] += 40;
PlayerInfo[playerid][pAmmuTrainTime] = 900;
SafeGivePlayerMoney(playerid, -125);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~Trening Zavrsen! ~n~~b~] ] ]",8000,3);
SCM(playerid, COLOR_GREY, "* Vas MSMG Trening je uspesno Zavrsen, Vas skill je sada za 40+ veci");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, 1056,X,Y,Z);
SetPlayerSkills(playerid);
Training[playerid] = 0;
SafeResetPlayerWeapons(playerid);
PlayerInfo[playerid][pWeaponReset] = 0;
}
return 1;
}


public TrainAk47(playerid)
{
if(Training[playerid] == 0)
{
SafeGivePlayerWeapon(playerid, 30, 120);
TogglePlayerControllable(playerid, 0);
SafeSetPlayerPos(playerid, 300.2353,-133.9278,1004.0625);
SetPlayerFacingAngle(playerid, 93.0408);
SetPlayerCameraPos(playerid, 293.5121,-136.3682,1004.0625);
SetPlayerCameraLookAt(playerid, 300.2353,-133.9278,1004.0625);
ApplyAnimation(playerid,"RIFLE","RIFLE_fire_poor",4.0,1,1,1,1,35000);
Training[playerid] = 1;
TrainTimer[playerid] = SetTimerEx("TrainAk47", 35000, false, "i", playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening... ~n~~l~] ] ]",35000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 1)
{
    SetPlayerCameraPos(playerid, 287.7752,-132.1296,1004.0625);
SetPlayerCameraLookAt(playerid, 300.2353,-133.9278,1004.0625);
ApplyAnimation(playerid,"RIFLE","RIFLE_fire",4.0,1,1,1,1,47000);
TrainTimer[playerid] = SetTimerEx("TrainAk47", 47000, false, "i", playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening... ~n~~p~] ~l~] ]",47000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
        Training[playerid] = 2;
}
else if(Training[playerid] == 2)
{
    SetPlayerCameraPos(playerid, 285.1598,-126.8113,1004.0625);
SetPlayerCameraLookAt(playerid, 300.2353,-133.9278,1004.0625);
ApplyAnimation(playerid,"RIFLE","RIFLE_crouchfire",4.0,1,1,1,1,58000);
TrainTimer[playerid] = SetTimerEx("TrainAk47", 58000, false, "i", playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening... ~n~~p~] ] ~l~]",58000,3);
        Training[playerid] = 3;
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 3)
{
SetCameraBehindPlayer(playerid);
ClearAnimations(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pAkSkill] += 30;
PlayerInfo[playerid][pAmmuTrainTime] = 1200;
SafeGivePlayerMoney(playerid, -140);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening Zavrsen! ~n~~p~] ] ]",8000,3);
SCM(playerid, COLOR_GREY, "* Vas AK-47 Trening je uspesno Zavrsen, Vas skill je sada za 30+ Higher");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, 1056,X,Y,Z);
SetPlayerSkills(playerid);
Training[playerid] = 0;
SafeResetPlayerWeapons(playerid);
PlayerInfo[playerid][pWeaponReset] = 0;
}
return 1;
}


public TrainM4(playerid)
{
    if(Training[playerid] == 0)
{
SafeGivePlayerWeapon(playerid, 31, 120);
TogglePlayerControllable(playerid, 0);
SafeSetPlayerPos(playerid, 300.2353,-133.9278,1004.0625);
SetPlayerFacingAngle(playerid, 93.0408);
SetPlayerCameraPos(playerid, 293.5121,-136.3682,1004.0625);
SetPlayerCameraLookAt(playerid, 300.2353,-133.9278,1004.0625);
ApplyAnimation(playerid,"RIFLE","RIFLE_fire_poor",4.0,1,1,1,1,35000);
TrainTimer[playerid] = SetTimerEx("TrainM4", 35000, false, "i", playerid);
Training[playerid] = 1;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~Trening... ~n~~l~] ] ]",35000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 1)
{
        SetPlayerCameraPos(playerid, 287.7752,-132.1296,1004.0625);
SetPlayerCameraLookAt(playerid, 300.2353,-133.9278,1004.0625);
ApplyAnimation(playerid,"RIFLE","RIFLE_fire",4.0,1,1,1,1,47000);
TrainTimer[playerid] = SetTimerEx("TrainM4", 47000, false, "i", playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~Trening... ~n~~p~] ~l~] ]",47000,3);
PlayerInfo[playerid][pWeaponReset] = 1;
Training[playerid] = 2;
}
else if(Training[playerid] == 2)
{
    SetPlayerCameraPos(playerid, 285.1598,-126.8113,1004.0625);
SetPlayerCameraLookAt(playerid, 300.2353,-133.9278,1004.0625);
ApplyAnimation(playerid,"RIFLE","RIFLE_crouchfire",4.0,1,1,1,1,58000);
TrainTimer[playerid] = SetTimerEx("TrainM4", 58000, false, "i", playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~Trening... ~n~~p~] ] ~l~]",58000,3);
Training[playerid] = 3;
PlayerInfo[playerid][pWeaponReset] = 1;
}
else if(Training[playerid] == 3)
{
    SetCameraBehindPlayer(playerid);
ClearAnimations(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pM4Skill] += 30;
PlayerInfo[playerid][pAmmuTrainTime] = 1200;
SafeGivePlayerMoney(playerid, -140);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Trening Zavrsen! ~n~~p~] ] ]",8000,3);
SCM(playerid, COLOR_GREY, "* Vas M4A4 Trening je uspesno Zavrsen, Vas skill je sada za 30+ Higher");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, 1056,X,Y,Z);
SetPlayerSkills(playerid);
Training[playerid] = 0;
SafeResetPlayerWeapons(playerid);
PlayerInfo[playerid][pWeaponReset] = 0;
}
return 1;
}