/invitetorace problem
#1

Hi guys and girls!
I have a problem with my events, I can't invite anyone to it. Actually I can invite but no one can see checkpoints ( Only I can see it if I invited myself to it or other admin invited himself. I think the problem is here or if it isn't just say, I will post more codes.

pawn Code:
CMD:invitetorace(playerid, params[])
    {
        new tmp[256];
        new idx;
        new string[256];
        new sendername[MAX_PLAYER_NAME];
        new giveplayer[MAX_PLAYER_NAME];
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameSage] >= 1)
            {
                tmp = strtok(params, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "Koristenje: /invitetorace [ID Igraca/Dio Imena] [Broj(1-7)]");
                    SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
                    SendClientMessage(playerid, 0x33CCFFAA, "1.u IZRADI || 2.TourSA || 3.ForestRace || 4.Monster Ring || 5. u IZRADI || 6. CR vs. NGR");
                    SendClientMessage(playerid, 0x33CCFFAA, "7.LV Freeway Race");
                    SendClientMessage(playerid, LIGHTRED, "|_________________________________________________________________________________|");
                    return 1;
                }
                new level;
                new race[20];
                new para1;
                para1 = ReturnUser(tmp);
                tmp = strtok(params, idx);
                level = strval(tmp);
                if(level > 7 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Nemojte ispod 0 ili preko 7!"); return 1; }
                if(IsPlayerConnected(para1))
                {
                        if(para1 != INVALID_PLAYER_ID)
                        {
                            if(level == 1)
                            {
                                PlayerInfo[para1][pUtrka] = 1;
                                race = "Cross utrku";
                            }
                            else if(level == 2)
                            {
                                PlayerInfo[para1][pUtrka] = 1;
                                race = "TourSA";
                                RCP[playerid] = 1;
                            }
                            else if(level == 3)
                            {
                                PlayerInfo[para1][pUtrka] = 1;
                                race = "Forest Race";
                            }
                            else if(level == 4)
                            {
                                PlayerInfo[para1][pUtrka] = 1;
                                race = "Monster Ring";
                            }
                            else if(level == 5)
                            {
                                PlayerInfo[para1][pUtrka] = 1;
                                race = "Survivor";
                            }
                            else if(level == 6)
                            {
                                if(PlayerInfo[para1][pMember]==14 || PlayerInfo[para1][pLeader]==14 || PlayerInfo[para1][pMember]==16 || PlayerInfo[para1][pLeader]==16)
                                {
                                    PlayerInfo[para1][pUtrka] = 1;
                                    race = "CR vs. NGR";
                                }
                                else {SCM(playerid,COLOR_GRAD1,"Na ovu Utrku mozes pozvati samo Clanove/Lidere NGR-a i CR-a !");}
                            }
                            else if(level == 7)
                            {
                                PlayerInfo[para1][pUtrka] = 1;
                                race = "LVFR";
                            }
                            GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            format(string, sizeof(string), "* Pozvan si na %s | Od Admina: {FFFFFF}%s", race,sendername);
                            SendClientMessage(para1, SVETLOPLAVA, string);
                            format(string, sizeof(string), "* Pozvao si %s-a na {FFFFFF} | %s.", giveplayer,race);
                            SendClientMessage(playerid, ZELENKASTA, string);
                        }
                }
            }
        }
        return 1;
    }
Reply
#2

try to change para1 to giveplayer
Reply
#3

Can you change it for me 'cuz I am doing somewhere wrong ?
Reply
#4

Why don't you use sscanf, its way more easier than what you are currently using!
Reply
#5

PHP Code:
if(sscanf(params"<Here goes the params"blahblah)) return SendClientMessage(playerid, -1"USAGE: /command [Blah] [Blah]"); 
Reply
#6

Ok, I'll try, wait for my respond
Reply
#7

No, still players who invite only themselves( Admins / Gamesages) can see the checkpoints
Reply
#8

Anyone ?
Reply
#9

Please guys, I wouldn't ask if it wasn't URGENT!
Reply
#10

*BUMP*
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)