How to make a variable
#4

Quote:
Originally Posted by BlackM
Посмотреть сообщение
Well what you can do is retrieve the faction ID of a player and place it in the first dimension of FacInfo for example:
Код:
CMD:arrest(playerid, params) // arresting command
{
     new targetid;
     If(sscanf(params,"u", targetid)) return SendClientMessage(playerid, -1, "Usage");
     new fID = Playerinfo[playerid][factionID];
     If( FacInfo[fID][CanArrest] != true) return SendClientMessage(playerid, -1, "Your faction does not authorise you to arrest!");
   ArrestPlayer(targetid);
}
Hope this helped u
How can i make it a global variable, cause i want it to be like

ID = FacInfo[MAX_FACTIONS][fInfo];

How do we make MAX_FACTIONS look up the proper file??
"/facitons/%i", FactionInfo[ID][fInfo];
Reply


Messages In This Thread
How to make a variable - by Cole_William - 21.07.2014, 23:52
Re: How to make a variable - by Cole_William - 22.07.2014, 01:34
Re: How to make a variable - by BlackM - 22.07.2014, 02:04
Re: How to make a variable - by Cole_William - 22.07.2014, 18:26
Re: How to make a variable - by [D]ry[D]esert - 22.07.2014, 18:50
Re: How to make a variable - by Sawalha - 22.07.2014, 18:51

Forum Jump:


Users browsing this thread: 1 Guest(s)