Jump to content
  • 0
Sign in to follow this  
Exaton

Problema sistem

Question

Salut sa-mp.ro, am o problema la un  sistem de sumo in care cand dau /sumo ma da in meci si ma scoate automat fara sa doresc eu, cum as putea rezolva?

COD:

function Leave_Sumo(playerid) {
    DestroyVehicle(SumoCAR[playerid]); new string[124]; format(string, 128, "%s leave sumo arena", GetName(playerid));
    SendSumoArena(COLOR_YELLOW, string); InSumo[playerid] = 0; SetPlayerPosEx(playerid, 1154.7026,-1440.1458,15.7969);
    Iter_Remove(Sumo,playerid); SetPlayerVirtualWorld(playerid,0); TogglePlayerControllable(playerid, 1);
    TextDrawHideForPlayer(playerid, Sumo_TD); return  1;
}

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0
Acum 12 ore, Exaton a spus:

Salut sa-mp.ro, am o problema la un  sistem de sumo in care cand dau /sumo ma da in meci si ma scoate automat fara sa doresc eu, cum as putea rezolva?

COD:

function Leave_Sumo(playerid) {
    DestroyVehicle(SumoCAR[playerid]); new string[124]; format(string, 128, "%s leave sumo arena", GetName(playerid));
    SendSumoArena(COLOR_YELLOW, string); InSumo[playerid] = 0; SetPlayerPosEx(playerid, 1154.7026,-1440.1458,15.7969);
    Iter_Remove(Sumo,playerid); SetPlayerVirtualWorld(playerid,0); TogglePlayerControllable(playerid, 1);
    TextDrawHideForPlayer(playerid, Sumo_TD); return  1;
}

Daca esti singurul jucator la sumo normal ca te scoate dupa cateva miunte trebuie sa fie mai multi jucatori

Share this post


Link to post
Share on other sites
  • 0
Acum 6 minute, ANDR a spus:

Daca esti singurul jucator la sumo normal ca te scoate dupa cateva miunte trebuie sa fie mai multi jucatori

Ma scoate direct si cand dau iar /sumo tot ma scoate dar se pune locul, cum dau /sumo ma scoate imediat

Share this post


Link to post
Share on other sites
  • 0
Acum 12 ore, Kanon a spus:

Arata comanda /sumo.

    if(dialogid == DIALOG_SUMO) {
        if(response) {
            if(listitem == 0) {
                if(SumoStatus == 1) return SendClientMessage(playerid, -1, "Asteapta sa termine aceasta rund");
                if(InSumo[playerid] == 1) return SendClientMessage(playerid, -1, "Esti deja in arena");
                if(Iter_Count(Sumo) > 9) return SendClientMessage(playerid, -1, "Sunt prea multi jucatori in arena");
                if(!IsPlayerInRangeOfPoint(playerid, 7.0, 2177.5938,1285.7144,10.8203)) return SendClientMessage(playerid, -1, "Nu esti la Sumo Arena");
                if(PlayerInfo[playerid][pCarLic] == 0) return SendClientMessage(playerid, -1, "Nu ai licenta de condus");
                InSumo[playerid] = 1;SumoPlayers++;
                SumoCAR[playerid] = CreateVehicle(502, SumoFloat[SumoPlayers][0], SumoFloat[SumoPlayers][1], SumoFloat[SumoPlayers][2], SumoFloat[SumoPlayers][3], 1, 1, -1);
                PutPlayerInVehicle(playerid, SumoCAR[playerid], 0);
                TogglePlayerControllable(playerid, 0);Iter_Add(Sumo,playerid);
                format(string, 128, "%s a intrat in arena(%d)", GetName(playerid),SumoPlayers);
                SendSumoArena(COLOR_YELLOW, string);
                if(SumoPlayers > 1) {
                    TimerSumoR = 30;
                }
            }
        }
    }

Share this post


Link to post
Share on other sites
  • 0
Acum 10 ore, Exaton a spus:

    if(dialogid == DIALOG_SUMO) {
        if(response) {
            if(listitem == 0) {
                if(SumoStatus == 1) return SendClientMessage(playerid, -1, "Asteapta sa termine aceasta rund");
                if(InSumo[playerid] == 1) return SendClientMessage(playerid, -1, "Esti deja in arena");
                if(Iter_Count(Sumo) > 9) return SendClientMessage(playerid, -1, "Sunt prea multi jucatori in arena");
                if(!IsPlayerInRangeOfPoint(playerid, 7.0, 2177.5938,1285.7144,10.8203)) return SendClientMessage(playerid, -1, "Nu esti la Sumo Arena");
                if(PlayerInfo[playerid][pCarLic] == 0) return SendClientMessage(playerid, -1, "Nu ai licenta de condus");
                InSumo[playerid] = 1;SumoPlayers++;
                SumoCAR[playerid] = CreateVehicle(502, SumoFloat[SumoPlayers][0], SumoFloat[SumoPlayers][1], SumoFloat[SumoPlayers][2], SumoFloat[SumoPlayers][3], 1, 1, -1);
                PutPlayerInVehicle(playerid, SumoCAR[playerid], 0);
                TogglePlayerControllable(playerid, 0);Iter_Add(Sumo,playerid);
                format(string, 128, "%s a intrat in arena(%d)", GetName(playerid),SumoPlayers);
                SendSumoArena(COLOR_YELLOW, string);
                if(SumoPlayers > 1) {
                    TimerSumoR = 30;
                }
            }
        }
    }

din cate vad eu ai limitare la 3 playeri minim la acest gen de eveniment .

sa iti dai seama de asta cauta SumoPlayers .

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

This site uses cookies. By continuing browsing, you agree to the use of this information. For more details, see Terms of Use and Privacy Policy.