hunter help
#3

Is this what you're looking for?

PHP Code:
enum PLAYER_DATA
{
    
hunterperms
}
new 
PlayerData[MAX_PLAYERS][PLAYER_DATA];
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
      if(
GetVehicleModel(vehicleid) == 425){
            if(!
PlayerData[playerid][hunterperms]){
                  
SendClientMessage(playerid, -1"SERVER: You don't have permission to use this.");
                  
ClearAnimations(playerid);
            }
       }
      return 
1;
}
CMD:hunterperms(playeridparams[])
{
     new 
string[128], playerb;
     if(
sscanf(params"u"playerb))return SendClientMessage(playerid, -1"Usage: /hunterperms [playerid OR name]");
     if(!
IsPlayerConnected(playerb))return SendClientMessage(playerid, -1"That player isn't connected.");
     
     if(!
PlayerData[playerb][hunterperms]){
          
PlayerData[playerb][hunterperms] = 1;
          
SendClientMessage(playerb, -1"SERVER: You were given hunter permissions.");
     }
     else{
          
PlayerData[playerb][hunterperms] = 0;
          
SendClientMessage(playerb, -1"SERVER: You lost your hunter permissions.");
    }
    return 
1;

Reply


Messages In This Thread
hunter help - by Stormfire - 07.06.2017, 07:59
Re: hunter help - by 1fret - 07.06.2017, 08:03
Re: hunter help - by Kane - 07.06.2017, 08:15
Re: hunter help - by Stormfire - 07.06.2017, 09:37

Forum Jump:


Users browsing this thread: 1 Guest(s)