SA-MP Forums Archive
hunter help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: hunter help (/showthread.php?tid=635446)



hunter help - Stormfire - 07.06.2017

how to give hunter permission to another player by a admin can any one help me?


Re: hunter help - 1fret - 07.06.2017

what? you mean like an admin have to give you permission to use hunter?


Re: hunter help - Kane - 07.06.2017

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;




Re: hunter help - Stormfire - 07.06.2017

yes thank you Arthur Kane for your help