/invitetorace problem -
Sime30 - 01.02.2013
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;
}
Re: /invitetorace problem -
Naruto_Emilio - 01.02.2013
try to change para1 to giveplayer
Re: /invitetorace problem -
Sime30 - 01.02.2013
Can you change it for me 'cuz I am doing somewhere wrong ?
Re: /invitetorace problem -
Naruto_Emilio - 01.02.2013
Why don't you use sscanf, its way more easier than what you are currently using!
Re: /invitetorace problem -
ThePhenix - 01.02.2013
PHP Code:
if(sscanf(params, "<Here goes the params", blah, blah)) return SendClientMessage(playerid, -1, "USAGE: /command [Blah] [Blah]");
Re: /invitetorace problem -
Sime30 - 01.02.2013
Ok, I'll try, wait for my respond
Re: /invitetorace problem -
Sime30 - 01.02.2013
No, still players who invite only themselves( Admins / Gamesages) can see the checkpoints
Re: /invitetorace problem -
Sime30 - 02.02.2013
Anyone ?
Re: /invitetorace problem -
Sime30 - 04.02.2013
Please guys, I wouldn't ask if it wasn't URGENT!
Re: /invitetorace problem -
Sime30 - 04.02.2013
*BUMP*