Weapon Hack[Problem]
#1

if a player has any one of these weapons we all get spammed that he has weapons and he doesent get kicked..


PHP код:
                forward weaponhack(playerid);
                    public 
weaponhack(playerid)
                    {
                        for(new 
iMAX_PLAYERSi++)
                        {
                            new 
sendername[MAX_PLAYER_NAME];
                            
GetPlayerName(isendernamesizeof(sendername));
                              new 
string[256];
                            if(
GetPlayerWeapon(i) == 35  || GetPlayerWeapon(i) == 37 || GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 17)
                            {
                                
format(stringsizeof(string), "%s a primit Kick de la BOT, Motiv: Weapon Hack",sendername);
                                
SendClientMessageToAll(COLOR_REDstring);
                                
Kick(playerid);
                                return 
1;
                                }
                        }
                         return 
1;
                    } 
Reply
#2

Kick(i) instead of playerid
Reply
#3

Here you have defined that the player who is hacking is "i". So why are you kicking "playerid" when he even does'nt come in the code.
So just change Kick(playerid) to Kick(i).
Reply
#4

That is right And why do you have that parameter playerid you don't use it in this function
Reply
#5

Try this:

PHP код:
forward weaponhack(playerid);
public 
weaponhack(playerid)
{
    for(new 
iMAX_PLAYERSi++)
     {
          new 
sendername[MAX_PLAYER_NAME];
        
GetPlayerName(isendernamesizeof(sendername));
         new 
string[256];
          if(
GetPlayerWeapon(i) == 35  || GetPlayerWeapon(i) == 37 || GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 17)
           {
            
format(stringsizeof(string), "%s a primit Kick de la BOT, Motiv: Weapon Hack",sendername);
SendClientMEssageToAll(COLOR_REDstring);
              
Kick(i);
               return 
1;
        }
      }
       return 
1;

Reply
#6

are you f*****g kidding me, gtakiller what does we talked about in 2 previous comments ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)