I need help with my Anti Jet Pack script.
#1

Hi, I need please help me with this script, I need to know if it really will work, and if there is a better way to do.

PHP код:
stock JetPackHacks(playerid)
{
    new 
str[256];
    new 
str2[256];
     if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
      {
      
format(strsizeof(str)),"Player: %s has been banned to Jetpack Hacks",GetPlayerName(playerid);
      
SendClientMessageToAll(COLOR_REDstr);    
      
Ban(playerid);
      }
      else if(
IsPlayerAdmin(playerid))
          {
          
format(str2sizeof(str2)),"Administrator: %s is now using a Jetpack"GetPlayerName(playerid};
          
SendClientMessageToAll(COLOR_NAVYstr2);
    return 
1;

Reply
#2

Do you get any errors when compiling
Reply
#3

No, I don't.
I need to know if it really will work, and if there is a better way to do.
Reply
#4

First of all, this will ban admins.

pawn Код:
stock JetPackHacks(playerid)
{
    new str[256];
    if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
    {
        if(!IsPlayerAdmin(playerid))
        {
            format(str, sizeof(str)),"Player: %s has been banned to Jetpack Hacks",GetPlayerName(playerid);
            SendClientMessageToAll(COLOR_RED, str);    
            Ban(playerid);
        }
        else
        {
            format(str2, sizeof(str)),"Administrator: %s is now using a Jetpack", GetPlayerName(playerid};
            SendClientMessageToAll(COLOR_NAVY, str);
        }
    }
    return 1;
}
The above code should work.
Reply
#5

The function of this script will be ban players that are using JetPack With the only exception administrators.
PHP код:
stock JetPackHacks(playerid)
{
    new 
str[256];
    new 
str2[256];
     if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
      {
      
format(strsizeof(str)),"Player: %s has been banned to Jetpack Hacks",GetPlayerName(playerid);
      
SendClientMessageToAll(COLOR_REDstr);    
      
Ban(playerid);
      }
      else if(
IsPlayerAdmin(playerid))
          {
          
format(str2sizeof(str2)),"Administrator: %s is now using a Jetpack"GetPlayerName(playerid};
          
SendClientMessageToAll(COLOR_NAVYstr2);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)