Problem[Help]
#1

how supposed to work:if leader 1 types /fac all of pd faction sees message..
Problem:if leader 1 types /fac everybody from server sees it..rep if you need!

PHP код:
if(!strcmp(cmdtext"/fac"true))
                    {
                        if(
IsPlayerConnected(playerid))
                        {
                            if(
PlayerInfo[playerid][pLeader] == 1)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsACopCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 2)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsAFbiCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 3)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsANgCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 4)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsAFireCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 5)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsAGustaCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 6)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsAMafiaCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 7)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsAGovernmentCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 8)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsAYepCar(car)) SetVehicleToRespawn(car);
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 9)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsANrCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                                return 
1;
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 10)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsATaxiCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 11)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsAMSCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 12)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsAGlenCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 13)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsAGangCar7(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 14)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsANapCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 15)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsATowCar(car)) SetVehicleToRespawn(car);
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            else if(
PlayerInfo[playerid][pLeader] == 16)
                            {
                                new 
bool:unwanted[CAR_AMOUNT];
                                for(new 
player=0player<MAX_PLAYERSplayer++)
                                {
                                    if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
                                }
                                for(new 
car 1car <= 400car++)
                                {
                                    if(
IsATigaCar(car)) SetVehicleToRespawn(car);
                                    
GetPlayerName(playeridsendernamesizeof(sendername));
                                    
format(string,sizeof(string), "Liderul vostru %s a respawnat masinile al factiuni!",sendername);
                                }
                            }
                            
SendFamilyMessage(playeridCOLOR_LIGHTBLUEstring);
                            return 
1;
                        }
                        return 
1;
                    } 
Reply


Messages In This Thread
Problem[Help] - by Akcent_Voltaj - 24.09.2012, 13:45
Re: Problem[Help] - by Akcent_Voltaj - 24.09.2012, 16:52
Re: Problem[Help] - by Akcent_Voltaj - 24.09.2012, 18:54
Re: Problem[Help] - by Akcent_Voltaj - 25.09.2012, 13:34
Re: Problem[Help] - by Stanford - 25.09.2012, 13:36
Re: Problem[Help] - by Akcent_Voltaj - 25.09.2012, 14:14
Re: Problem[Help] - by Akcent_Voltaj - 25.09.2012, 17:11
Re : Problem[Help] - by Varkoll_ - 25.09.2012, 20:31
Re: Problem[Help] - by Akcent_Voltaj - 25.09.2012, 20:51
Re : Problem[Help] - by Varkoll_ - 25.09.2012, 21:09

Forum Jump:


Users browsing this thread: 2 Guest(s)