07.06.2017, 07:59
how to give hunter permission to another player by a admin can any one help me?
enum PLAYER_DATA
{
hunterperms
}
new PlayerData[MAX_PLAYERS][PLAYER_DATA];
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
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(playerid, params[])
{
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;
}