Bool in enum.
#6

pawn Код:
new intTmp;
INI_Int("AdminDuty", intTmp);
P_DATA[playerid][pADuty] = !!intTmp;
Little conversion from int to bool.

Make the P_DATA pADuty a boolean!

edit:
pawn Код:
#define IntToBool(%1,%2)    (%1=!!%2)
INI_Int("AdminDuty", IntToBool(strval(value), PlayerInfo[playerid][E_ADMINDUTY]));
Reply


Messages In This Thread
Bool in enum. - by antonio112 - 04.11.2011, 23:52
Re: Bool in enum. - by Vince - 05.11.2011, 00:05
Re: Bool in enum. - by Kush - 05.11.2011, 00:06
Re: Bool in enum. - by antonio112 - 05.11.2011, 00:16
Re: Bool in enum. - by steki. - 05.11.2011, 00:22
Re: Bool in enum. - by Lorenc_ - 05.11.2011, 00:22
Re: Bool in enum. - by Kush - 05.11.2011, 00:59
Re: Bool in enum. - by antonio112 - 05.11.2011, 01:06
Re: Bool in enum. - by Lorenc_ - 05.11.2011, 01:13
Re: Bool in enum. - by antonio112 - 05.11.2011, 01:17

Forum Jump:


Users browsing this thread: 1 Guest(s)