/invite - problem!
#1

PHP код:
                    if(strcmp(cmd"/invite"true) == 0// cand invite someone in faction!the nu poti says.
                    
{
                    if(
IsPlayerConnected(playerid))
                    {
                    
tmp strtok(cmdtextidx);
                    if(!
strlen(tmp))
                    {
                    
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /invite [playerid/PartOfName]");
                    return 
1;
                    }
                    new 
para1;
                    new 
ftext[20];
                    
para1 ReturnUser(tmp);
                    if(
PlayerInfo[playerid][pLeader] == && PlayerInfo[para1][pMember] != 1)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == && PlayerInfo[para1][pMember] != 2)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == && PlayerInfo[para1][pMember] != 3)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == && PlayerInfo[para1][pMember] != 4)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == && PlayerInfo[para1][pMember] != 5)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == && PlayerInfo[para1][pMember] != 6)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == && PlayerInfo[para1][pMember] != 7)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == && PlayerInfo[para1][pMember] != 8)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == && PlayerInfo[para1][pMember] != 9)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == 10 && PlayerInfo[para1][pMember] != 10)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == 11 && PlayerInfo[para1][pMember] != 11)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == 12 && PlayerInfo[para1][pMember] != 12)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == 13 && PlayerInfo[para1][pMember] != 13)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == 14 && PlayerInfo[para1][pMember] != 14)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == 15 && PlayerInfo[para1][pMember] != 15)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !!");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pLeader] == 16 && PlayerInfo[para1][pMember] != 16)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTRED"Nu Poti !");
                        return 
1;
                    }
                    if (
PlayerInfo[playerid][pLeader] >= 1)
                    {
                    if(
IsPlayerConnected(para1))
                    {
                    if(
para1 != INVALID_PLAYER_ID)
                    {
                    if (
gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == && PlayerInfo[para1][pFMember] == 255 || PlayerInfo[para1][pLeader] == 0)
                    {
                    if(
PlayerInfo[para1][pBlackList] == 1)
                    {
                    
SendClientMessage(playeridCOLOR_WHITE"Acest Player are BlackList!");
                    return 
1;
                    }
                       if(
PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2gTeam[para1] = 2ftext "Police Romana"ChosenSkin[para1] = 280SetPlayerSkin(para1280); }
                    else if(
PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2gTeam[para1] = 2ftext "S.R.I"ChosenSkin[para1] = 286SetPlayerSkin(para1286); }
                    else if(
PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2gTeam[para1] = 2ftext "Armata Romana"ChosenSkin[para1] = 287SetPlayerSkin(para1287); }
                    else if(
PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1gTeam[para1] = 1ftext "Pompieri"ChosenSkin[para1] = 70SetPlayerSkin(para170); }
                    else if(
PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5gTeam[para1] = 5ftext "The Gusta"ChosenSkin[para1] = 258SetPlayerSkin(para1120); }
                    else if(
PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5gTeam[para1] = 5ftext "The Mafia"ChosenSkin[para1] = 120SetPlayerSkin(para1258); }
                    else if(
PlayerInfo[playerid][pLeader] == 7) { return 1; }
                    else if(
PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10gTeam[para1] = 12ftext "The Yeperti"ChosenSkin[para1] = 127SetPlayerSkin(para1127); }
                    else if(
PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12ftext "News Reporter"ChosenSkin[para1] = 148SetPlayerSkin(para1148); }
                    else if(
PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12ftext "Taxi"ChosenSkin[para1] = 255SetPlayerSkin(para1255); }
                    else if(
PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12ftext "MS-13"ChosenSkin[para1] = 67SetPlayerSkin(para167); }
                    else if(
PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12ftext "Glen Park"ChosenSkin[para1] = 102SetPlayerSkin(para1102); }
                    else if(
PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12ftext "Hitman"ChosenSkin[para1] = 185SetPlayerSkin(para1185); }
                    else if(
PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12ftext "Mafia Napoletana"ChosenSkin[para1] = 104SetPlayerSkin(para1104); }
                    else if(
PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12ftext "Remorcari Auto"ChosenSkin[para1] = 50SetPlayerSkin(para150); }
                    else if(
PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 12gTeam[para1] = 12ftext "La Tigani"ChosenSkin[para1] = 67SetPlayerSkin(para167); }
                    else { return 
1; }
                    
GetPlayerName(para1giveplayersizeof(giveplayer));
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                    
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
                    
PlayerInfo[para1][pRank] = 1;
                    
printf("News: %s has invited %s to join %s."sendernamegiveplayerftext);
                    
format(stringsizeof(string), "   You have Joined the %s, you were invited by Leader %s"ftextsendername);
                    
SendClientMessage(para1COLOR_LIGHTBLUEstring);
                    
format(stringsizeof(string), "   You have Invited %s to join the %s."giveplayer,ftext);
                    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    
SetPlayerInterior(para1,0);
                    new 
rand random(sizeof(gInviteSpawns));
                    
SetPlayerPos(para1gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
                    
SetPlayerFacingAngle(para1gInviteSpawns[rand][3]);
                    
SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                    
SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                    
TogglePlayerControllable(para10);
                    
SelectChar[para1] = 255;
                    
SelectCharID[para1] = PlayerInfo[para1][pMember];
                    
SelectCharPlace[para1] = 1;
                    
PlayerInfo[para1][pModel] = ChosenSkin[para1];
                    
PlayerInfo[para1][pChar] = ChosenSkin[para1];
                    
SendClientMessage(para1COLOR_LIGHTRED"Scrie 'next' fara / ca sa schimbi skin !");
                    
SendClientMessage(para1COLOR_LIGHTRED"Daca ti-ai ales un skin scrie 'done' fara / !");
                    }
                    else
                    {
                    
SendClientMessage(playeridCOLOR_GREY"  That player is currently Wanted / a Different Team / or already a Family Member.");
                    return 
1;
                    }
                    }
                    }
//not connected
                    
}
                    else
                    {
                    
SendClientMessage(playeridCOLOR_GRAD1"   you are not authorized to use that command(leaders only)!");
                    }
                    }
                    return 
1;
                    } 
Reply
#2

What's the error message?
Reply
#3

no errors..
Reply
#4

Then what is the problem ?
Reply
#5

never mind fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)