Jump to content

Cucubau

Membru
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Cucubau

  1. Acum 44 minute, sk1ZoOr a spus:

    Salutare am si eu o problema cu comanda /accept taxi folosesc gm-ul droom, problema este in felul urmator vreau sa fac in asa fel cand un taximetrist accepta o comanda sa ii apara cp cu locatia playerului.

    Si o alta problema nici comanda /cancel taxi nu exista .

     

    CMD:taxi(playerid, params[])
    {
        if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMember] != 13) return SendClientMessage(playerid, COLOR_GREY, "To call a taxi, use /service taxi.");
            new action[10], id, sendername[30], giveplayer[30], string[128], Float: X, Float: Y, Float: Z;
            if(sscanf(params, "s[10]u", action, id)) return SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /taxi [action] [id]");
            if(strcmp(action,"accept",true) == 0)
            {
                if(TaxiFare[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTGREEN3, "You can't accept a call because you're not on duty.");
                if(TaxiCall[id] == 0) return SendClientMessage(playerid, COLOR_GREY, "This player hasn't called for a taxi, or someone else accepted the call.");
                if(IsPlayerConnected(id))
                {
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    GetPlayerName(id, giveplayer, sizeof(giveplayer));
                    if(PlayerInfo[id][pLanguage] == 2) format(string, sizeof(string), "Taximetristul %s ti-a acceptat apelul. Asteapta taxiul aici.", sendername);
                    else format(string, sizeof(string), "Taxi driver %s has accepted your call. Please wait here for the taxi.", sendername);
                    SendClientMessage(id, COLOR_YELLOW, string);
                    SS(id, COLOR_WHITE, "Daca nu mai ai nevoie de un taxi, foloseste /cancel taxi.", "If you don't need a taxi anymore, use /cancel taxi.");
                    format(string, sizeof(string), "Taxi driver %s has accepted the call from %s. Distance: %.0fm.",sendername,giveplayer,GetDistanceBetweenPlayers(playerid, TaxiCall[id]));
                    SendFamilyMessage(13, COLOR_CYAN, string);
                    format(string, sizeof(string), "Checkpoint set on %s [%d].", giveplayer, id);
                    SendClientMessage(playerid, COLOR_YELLOW, string);
                    TaxiAccepted[playerid] = id;
                    TaxiCall[id] = 0;
                    GetPlayerPos(id, X, Y, Z);
                    DisablePlayerCheckpoint(playerid);
                    SetPlayerCheckpoint(playerid, X,Y,Z, 3.0);
                    UsedFind[playerid] = 1;
                    targetfind[playerid] = id;
                    return 1;
                }
                else return SendClientMessage(playerid, COLOR_GREY, "Player not connected.");
            }
            else if(strcmp(action,"cancel",true) == 0)
            {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SendClientMessage(playerid, COLOR_WHITE, "You have canceled the taxi call!");
                format(string, sizeof(string), "Taxi driver %s canceled your call.", sendername);
                SendClientMessage(TaxiAccepted[playerid], COLOR_YELLOW, string);
                TaxiAccepted[playerid] = -1;
                DisablePlayerCheckpoint(playerid);
                UsedFind[playerid] = 0;
                targetfind[playerid] = -1;
            }
        }
        return 1;
    }

     

     

    CMD:service(playerid, params[])
    {
        if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
        if(IsPlayerConnected(playerid))
        {
            new x_nr[256],string[300],sendername[30],medics,taxidrivers;
            if(sscanf(params, "s[256]",x_nr))
            {
                SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /service [item]");
                  SendClientMessage(playerid, COLOR_WHITE, "Available services: medic, taxi");
                return 1;
            }
            if(strcmp(x_nr,"taxi",true) == 0)
            {
                if(PlayerInfo[playerid][pMember] == 13) return SendClientMessage(playerid, COLOR_GREY, "You can't call a taxi because you're a taxi driver!");
                foreach(new i : Player)
                {
                    if(TaxiFare > 0) taxidrivers++;
                }
                if(taxidrivers == 0) return SendClientMessage(playerid, COLOR_YELLOW, "There are no taxi drivers on duty at the moment.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                foreach(new i : Player)
                {
                    if(PlayerInfo[pMember] == 13 && TaxiFare > 0)
                    {
                        format(string, sizeof(string), "%s [%d] has called for a taxi. Distance: %.0fm.", sendername,playerid,GetDistanceBetweenPlayers(playerid, i));
                        SendClientMessage(i, COLOR_CYAN, string);
                    }
                }
                SendClientMessage(playerid, COLOR_GREY, "You have called for a taxi. Please wait here!");
                TaxiCall[playerid] = 1;
                return 1;
            }
        }
        return 1;
    }

  2. Acum 6 ore, Exodus_xD a spus:

     

     

     

        //Player TextDraws

        LoginPTD[playerid][2] = CreatePlayerTextDraw(playerid, 250.644073, 233.166671, "PAROLA: CLICK");
        PlayerTextDrawLetterSize(playerid, LoginPTD[playerid][2], 0.400000, 1.600000);
        PlayerTextDrawTextSize(playerid, LoginPTD[playerid][2], 378.000000, 0.000000);
        PlayerTextDrawAlignment(playerid, LoginPTD[playerid][2], 1);
        PlayerTextDrawColor(playerid, LoginPTD[playerid][2], -1);
        PlayerTextDrawUseBox(playerid, LoginPTD[playerid][2], 1);
        PlayerTextDrawBoxColor(playerid, LoginPTD[playerid][2], 255);
        PlayerTextDrawSetShadow(playerid, LoginPTD[playerid][2], 0);
        PlayerTextDrawSetOutline(playerid, LoginPTD[playerid][2], 0);
        PlayerTextDrawBackgroundColor(playerid, LoginPTD[playerid][2], 255);
        PlayerTextDrawFont(playerid, LoginPTD[playerid][2], 1);
        PlayerTextDrawSetProportional(playerid, LoginPTD[playerid][2], 1);
        PlayerTextDrawSetShadow(playerid, LoginPTD[playerid][2], 0);
        PlayerTextDrawSetSelectable(playerid, LoginPTD[playerid][2], true);

        LoginPTD[playerid][1] = CreatePlayerTextDraw(playerid, 312.957336, 275.750000, "Last Login: 01.10.2018 20:00:00");
        PlayerTextDrawLetterSize(playerid, LoginPTD[playerid][1], 0.274436, 1.389999);
        PlayerTextDrawTextSize(playerid, LoginPTD[playerid][1], 0.000000, 144.000000);
        PlayerTextDrawAlignment(playerid, LoginPTD[playerid][1], 2);
        PlayerTextDrawColor(playerid, LoginPTD[playerid][1], -1);
        PlayerTextDrawUseBox(playerid, LoginPTD[playerid][1], 1);
        PlayerTextDrawBoxColor(playerid, LoginPTD[playerid][1], 255);
        PlayerTextDrawSetShadow(playerid, LoginPTD[playerid][1], 0);
        PlayerTextDrawSetOutline(playerid, LoginPTD[playerid][1], 0);
        PlayerTextDrawBackgroundColor(playerid, LoginPTD[playerid][1], 255);
        PlayerTextDrawFont(playerid, LoginPTD[playerid][1], 1);
        PlayerTextDrawSetProportional(playerid, LoginPTD[playerid][1], 1);
        PlayerTextDrawSetShadow(playerid, LoginPTD[playerid][1], 0);

        LoginPTD[playerid][0] = CreatePlayerTextDraw(playerid, 249.707031, 188.833358, "NUME: wNekiRo");
        PlayerTextDrawLetterSize(playerid, LoginPTD[playerid][0], 0.400000, 1.600000);
        PlayerTextDrawTextSize(playerid, LoginPTD[playerid][0], 377.000000, 0.000000);
        PlayerTextDrawAlignment(playerid, LoginPTD[playerid][0], 1);
        PlayerTextDrawColor(playerid, LoginPTD[playerid][0], -1);
        PlayerTextDrawUseBox(playerid, LoginPTD[playerid][0], 1);
        PlayerTextDrawBoxColor(playerid, LoginPTD[playerid][0], 255);
        PlayerTextDrawSetShadow(playerid, LoginPTD[playerid][0], 0);
        PlayerTextDrawSetOutline(playerid, LoginPTD[playerid][0], 0);
        PlayerTextDrawBackgroundColor(playerid, LoginPTD[playerid][0], 255);
        PlayerTextDrawFont(playerid, LoginPTD[playerid][0], 1);
        PlayerTextDrawSetProportional(playerid, LoginPTD[playerid][0], 1);
        PlayerTextDrawSetShadow(playerid, LoginPTD[playerid][0], 0);
        PlayerTextDrawSetSelectable(playerid, LoginPTD[playerid][0], true);

    in loc de  new PlayerText:LoginPTD[MAX_PLAYERS][2];  pui PlayerText:LoginPTD[MAX_PLAYERS][3],

  3. Acum 4 minute, Exodus_xD a spus:

    nup,alte erori

    C:\Users\wNekiRo\Desktop\GAMEMODE PLAYEDTIMES 2K18\gamemodes\GM2.pwn(5597) : error 035: argument type mismatch (argument 2)
    C:\Users\wNekiRo\Desktop\GAMEMODE PLAYEDTIMES 2K18\gamemodes\GM2.pwn(5598) : error 035: argument type mismatch (argument 2)
    C:\Users\wNekiRo\Desktop\GAMEMODE PLAYEDTIMES 2K18\gamemodes\GM2.pwn(5599) : error 017: undefined symbol "lastOn"
    C:\Users\wNekiRo\Desktop\GAMEMODE PLAYEDTIMES 2K18\gamemodes\GM2.pwn(5600) : error 032: array index out of bounds (variable "LoginPTD")
    C:\Users\wNekiRo\Desktop\GAMEMODE PLAYEDTIMES 2K18\gamemodes\GM2.pwn(5602) : error 035: argument type mismatch (argument 2)
    C:\Users\wNekiRo\Desktop\GAMEMODE PLAYEDTIMES 2K18\gamemodes\GM2.pwn(10356) : error 035: argument type mismatch (argument 2)
    C:\Users\wNekiRo\Desktop\GAMEMODE PLAYEDTIMES 2K18\gamemodes\GM2.pwn(34042) : error 001: expected token: "-identifier-", but found "["
    C:\Users\wNekiRo\Desktop\GAMEMODE PLAYEDTIMES 2K18\gamemodes\GM2.pwn(34043) : error 033: array must be indexed (variable "LoginPTD")
    Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


    8 Errors.
    [Finished in 65.0s]

    Eu am pus in gmul meu textul tau si nu imi da nici o eroare, asa am pus : new PlayerText:logo[MAX_PLAYERS][2]; 

        LoginPTD[playerid][0] = CreatePlayerTextDraw(playerid, 249.707031, 188.833358, "NUME: wNekiRo");
        PlayerTextDrawLetterSize(playerid, LoginPTD[playerid][0], 0.400000, 1.600000);
        PlayerTextDrawTextSize(playerid, LoginPTD[playerid][0], 377.000000, 0.000000);
        PlayerTextDrawAlignment(playerid, LoginPTD[playerid][0], 1);
        PlayerTextDrawColor(playerid, LoginPTD[playerid][0], -1);
        PlayerTextDrawUseBox(playerid, LoginPTD[playerid][0], 1);
        PlayerTextDrawBoxColor(playerid, LoginPTD[playerid][0], 255);
        PlayerTextDrawSetShadow(playerid, LoginPTD[playerid][0], 0);
        PlayerTextDrawSetOutline(playerid, LoginPTD[playerid][0], 0);
        PlayerTextDrawBackgroundColor(playerid, LoginPTD[playerid][0], 255);
        PlayerTextDrawFont(playerid, LoginPTD[playerid][0], 1);
        PlayerTextDrawSetProportional(playerid, LoginPTD[playerid][0], 1);
        PlayerTextDrawSetShadow(playerid, LoginPTD[playerid][0], 0);
        PlayerTextDrawSetSelectable(playerid, LoginPTD[playerid][0], true);

  4. Acum 4 ore, Exodus_xD a spus:

    SALUT!

    AM SI EU ACEASTA PROBLEMA LA TD

    AVETI MAI JOS EROAREA SI TD-UL,SPER SA POT REZOLVA...

     

    new PlayerText: LoginPTD[2];

    ===============ERORI===============

    gamemodes\GM2.pwn(2767) : warning 215: expression has no effect
    gamemodes\GM2.pwn(2767) : error 001: expected token: ";", but found "["
    gamemodes\GM2.pwn(2767) : error 029: invalid expression, assumed zero
    gamemodes\GM2.pwn(2767) : warning 215: expression has no effect
    gamemodes\GM2.pwn(2767) : error 001: expected token: ";", but found "]"
    gamemodes\GM2.pwn(2767) : fatal error 107: too many error messages on one line

    ===============LINIE TEXTDRAW===============

        LoginPTD[playerid][0] = CreatePlayerTextDraw(playerid, 249.707031, 188.833358, "NUME: wNekiRo");
        PlayerTextDrawLetterSize(playerid, LoginPTD[playerid][0], 0.400000, 1.600000);
        PlayerTextDrawTextSize(playerid, LoginPTD[playerid][0], 377.000000, 0.000000);
        PlayerTextDrawAlignment(playerid, LoginPTD[playerid][0], 1);
        PlayerTextDrawColor(playerid, LoginPTD[playerid][0], -1);
        PlayerTextDrawUseBox(playerid, LoginPTD[playerid][0], 1);
        PlayerTextDrawBoxColor(playerid, LoginPTD[playerid][0], 255);
        PlayerTextDrawSetShadow(playerid, LoginPTD[playerid][0], 0);
        PlayerTextDrawSetOutline(playerid, LoginPTD[playerid][0], 0);
        PlayerTextDrawBackgroundColor(playerid, LoginPTD[playerid][0], 255);
        PlayerTextDrawFont(playerid, LoginPTD[playerid][0], 1);
        PlayerTextDrawSetProportional(playerid, LoginPTD[playerid][0], 1);
        PlayerTextDrawSetShadow(playerid, LoginPTD[playerid][0], 0);
        PlayerTextDrawSetSelectable(playerid, LoginPTD[playerid][0], true);

    Pune asa in loc de: new PlayerText: LoginPTD[2];   pui new PlayerText: LoginPTD[MAX_PLAYERS][2];

     

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