Jump to content

Problema comanda /exam


Onehitkill

Recommended Posts

  

Acum 8 minute, Onehitkill a spus:

Am o problema cu comanda /exam 

Daca scri "/dance" inainte de "/exam" cand o sa dai "/exam" dupa o sa te dea din masina jos, si iti arata checkpointurile

Vreau sa ma ajutati ca la aceasta comanda sa nu poata folosi comanda "/exam" daca nu au folosit ultima comanda "/stopanim"

___________________________________________________________________________________________________

 

CMD:exam(playerid, params[])
{
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "You can't use this command when you are in a car.");
    if(PlayerToPoint(5.0,playerid, 1219.0502,-1812.7823,16.5938))
    {
        new string[256];
        if(PlayerInfo[playerid][pCarLic] == 0)
         {
            if(PlayerInfo[playerid][pCarLicSuspend] > 0)
            {
                format(string,sizeof(string),"Permisul tau de conducere a fost suspendat recent. Poti da examenul peste %d ore.",PlayerInfo[playerid][pCarLicSuspend]);
                SendClientMessage(playerid, COLOR_GREY, string);
                return 1;
            }
            if(GetPlayerWeapon(playerid) == 46)return SCM(playerid, -1, "{ccff99}Nu poti da examenul daca deti o parasuta !");
              if(TakingLesson[playerid] == 0)
            {
                TakingLesson[playerid] = 1;
                   examcar[playerid] = AddStaticVehicle(410, 1214.6104,-1827.9747,13.1357,180.1865,-1,-1);
                SCM(playerid, COLOR_YELLOW, "Ai platit (-)5000$, pentru Scoala de soferi");
                Gas[examcar[playerid]] = 100;
                ClearAnimations(playerid);
                PutPlayerInVehicleEx(playerid, examcar[playerid], 0);
                DisableRemoteVehicleCollisions(playerid, 1);
                SendClientMessage(playerid, COLOR_WHITE, "Examenul a inceput. Mergi la checkpoint.");
                SendClientMessage(playerid, COLOR_WHITE, "Scrie /engine sau apasa tasta 2 pentru a porni motorul masinii.");
                CP[playerid] = 100;
                PlayerTextDrawShow(playerid, DMVexam[playerid]);
                format(string, sizeof(string), "~w~CHECKPOINTS: ~r~0~w~/~r~24");
                PlayerTextDrawSetString(playerid, DMVcheck[playerid], string);
                PlayerTextDrawShow(playerid, DMVcheck[playerid]);
                SetPlayerRaceCheckpoint(playerid,0, 1135.3868,-1850.5981,13.0366,1045.2626,-1809.4169,13.2637,4.0);
                GivePlayerCash(playerid,-5000);
            }
               else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}You already have test.");
          }
           else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}You already have a drivers license.");
    }
       else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}You are not at the DMV.");
    return 1;
}

 

____________________________________________________________________________________________________

Copiati comanda intrun fisier "numefisier.txt" , sa se vada clar codul

 

Edited by Onehitkill
Link to comment
Share on other sites

Acum 13 minute, Onehitkill a spus:

Ma ajutati ? :)


 

Greu sa te ajute cineva la ora asta... este foarte tarziu

new StopAnimDude[MAX_PLAYERS];

/*

Adauga StopAnimDude[playerid] = 1; la fiecare comanda de animatie si StopAnimDude[playerid] = 0; la comanda de /stopanim

*/

CMD:exam(playerid, params[])
{
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "You can't use this command when you are in a car.");
    if(StopAnimDude[playerid] == 1) return SendClientMessage(playerid, COLOR_WHITE, "Foloseste /stopanim inainte de a da examenul auto.");
    if(PlayerToPoint(5.0,playerid, 1219.0502,-1812.7823,16.5938))
    {
        new string[256];
        if(PlayerInfo[playerid][pCarLic] == 0)
         {
            if(PlayerInfo[playerid][pCarLicSuspend] > 0)
            {
                format(string,sizeof(string),"Permisul tau de conducere a fost suspendat recent. Poti da examenul peste %d ore.",PlayerInfo[playerid][pCarLicSuspend]);
                SendClientMessage(playerid, COLOR_GREY, string);
                return 1;
            }
            if(GetPlayerWeapon(playerid) == 46)return SCM(playerid, -1, "{ccff99}Nu poti da examenul daca deti o parasuta !");
              if(TakingLesson[playerid] == 0)
            {
                TakingLesson[playerid] = 1;
                   examcar[playerid] = AddStaticVehicle(410, 1214.6104,-1827.9747,13.1357,180.1865,-1,-1);
                SCM(playerid, COLOR_YELLOW, "Ai platit (-)5000$, pentru Scoala de soferi");
                Gas[examcar[playerid]] = 100;
                ClearAnimations(playerid);
                PutPlayerInVehicleEx(playerid, examcar[playerid], 0);
                DisableRemoteVehicleCollisions(playerid, 1);
                SendClientMessage(playerid, COLOR_WHITE, "Examenul a inceput. Mergi la checkpoint.");
                SendClientMessage(playerid, COLOR_WHITE, "Scrie /engine sau apasa tasta 2 pentru a porni motorul masinii.");
                CP[playerid] = 100;
                PlayerTextDrawShow(playerid, DMVexam[playerid]);
                format(string, sizeof(string), "~w~CHECKPOINTS: ~r~0~w~/~r~24");
                PlayerTextDrawSetString(playerid, DMVcheck[playerid], string);
                PlayerTextDrawShow(playerid, DMVcheck[playerid]);
                SetPlayerRaceCheckpoint(playerid,0, 1135.3868,-1850.5981,13.0366,1045.2626,-1809.4169,13.2637,4.0);
                GivePlayerCash(playerid,-5000);
            }
               else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}You already have test.");
          }
           else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}You already have a drivers license.");
    }
       else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}You are not at the DMV.");
    return 1;
}

 

  • Thanks 1

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

Acum 23 minute, StrikerM a spus:

Greu sa te ajute cineva la ora asta... este foarte tarziu


new StopAnimDude[MAX_PLAYERS];

/*

Adauga StopAnimDude[playerid] = 1; la fiecare comanda de animatie si StopAnimDude[playerid] = 0; la comanda de /stopanim

*/

CMD:exam(playerid, params[])
{
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "You can't use this command when you are in a car.");
    if(StopAnimDude[playerid] == 1) return SendClientMessage(playerid, COLOR_WHITE, "Foloseste /stopanim inainte de a da examenul auto.");
    if(PlayerToPoint(5.0,playerid, 1219.0502,-1812.7823,16.5938))
    {
        new string[256];
        if(PlayerInfo[playerid][pCarLic] == 0)
         {
            if(PlayerInfo[playerid][pCarLicSuspend] > 0)
            {
                format(string,sizeof(string),"Permisul tau de conducere a fost suspendat recent. Poti da examenul peste %d ore.",PlayerInfo[playerid][pCarLicSuspend]);
                SendClientMessage(playerid, COLOR_GREY, string);
                return 1;
            }
            if(GetPlayerWeapon(playerid) == 46)return SCM(playerid, -1, "{ccff99}Nu poti da examenul daca deti o parasuta !");
              if(TakingLesson[playerid] == 0)
            {
                TakingLesson[playerid] = 1;
                   examcar[playerid] = AddStaticVehicle(410, 1214.6104,-1827.9747,13.1357,180.1865,-1,-1);
                SCM(playerid, COLOR_YELLOW, "Ai platit (-)5000$, pentru Scoala de soferi");
                Gas[examcar[playerid]] = 100;
                ClearAnimations(playerid);
                PutPlayerInVehicleEx(playerid, examcar[playerid], 0);
                DisableRemoteVehicleCollisions(playerid, 1);
                SendClientMessage(playerid, COLOR_WHITE, "Examenul a inceput. Mergi la checkpoint.");
                SendClientMessage(playerid, COLOR_WHITE, "Scrie /engine sau apasa tasta 2 pentru a porni motorul masinii.");
                CP[playerid] = 100;
                PlayerTextDrawShow(playerid, DMVexam[playerid]);
                format(string, sizeof(string), "~w~CHECKPOINTS: ~r~0~w~/~r~24");
                PlayerTextDrawSetString(playerid, DMVcheck[playerid], string);
                PlayerTextDrawShow(playerid, DMVcheck[playerid]);
                SetPlayerRaceCheckpoint(playerid,0, 1135.3868,-1850.5981,13.0366,1045.2626,-1809.4169,13.2637,4.0);
                GivePlayerCash(playerid,-5000);
            }
               else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}You already have test.");
          }
           else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}You already have a drivers license.");
    }
       else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}You are not at the DMV.");
    return 1;
}

 

Am pus " StopAnimDude[playerid] == 1;" la comanda /dance si cand incerc sa dau exam imi zice sa scriu comanda /stopanim

am scris comanda /stopanim si scriu iar /exam tot asa sa scriu comanda /stopanim

Edited by Onehitkill
Link to comment
Share on other sites

Acum 1 minut, Onehitkill a spus:

Am pus " StopAnimDude[playerid] == 1;" la comanda /dance si cand incerc sa dau exam imi zice sa scriu comanda /stopanim

am scris comanda /stopanim si scriu iar /exam tot asa sa scriu comanda /stopanim

Deci... pui StopAnimDude[playerid] = 1; la animatia /dance asta find pe langa alte functii pe care le are comanda, dupa care adaugi comanda /exam in care eu ti-am adaugat restrictia sa nu poti folosi /exam daca ai dat /dance inainte.

Si la /stopanim adaugi StopAnimDude[playerid] = 0;

 

Nu am inteles ce ai zis te-ai incurcat singur in ce ai incercat sa imi explici, fi mai explicit te rog, citeste de mai multe ori ce ti-am scris si fi atent cu ce faci o sa iti iasa.

  • Thanks 1

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

Acum 30 minute, DarkWind a spus:

if(GetPlayerAnimationIndex(playerid) != 1189) return SCM(playerid, COLOR_ERROR, "Nu poti folosii aceasta comanda cand esti in miscare.");

Nu este bine asa, el daca face animatia /dance nu ii da animatia 1189 ... are cu totul alta animatie, asa ca ce ai facut tu sus nu o sa ii functioneze.

@Onehitkill A functionat ce ti-am dat ?

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

Acum 15 minute, Onehitkill a spus:

Mersi "StrikerM" Functioneaza acum

Cu placere!

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.