PDA

View Full Version : What does .extra & .bExtra means?


Segura
25/07/2014, 09:20 PM
Please explain these two in very simple words.


forward LoadUser_data(playerid,name[],value[]);
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);

PrivatioBoni
25/07/2014, 09:21 PM
bExtra and extra are used to pass additional data to the callback functions, e.g. the playerid parameter in the user system. If bExtra is true the value in extra will be passed as a parameter before identifier[]:

http://wiki.sa-mp.com/wiki/YSI:INI#bool:INI_ParseFile.28filename.5B.5D.2C_rem oteFormat.5B.5D.2C_bool:bFileFirst_.3D_false.2C_bo ol:bExtra_.3D_false.2C_extra_.3D_0.2C_bool:bLocal_ .3D_false.2C_bool:bPassTag_.3D_false.29

Segura
25/07/2014, 09:33 PM
http://wiki.sa-mp.com/wiki/YSI:INI#bool:INI_ParseFile.28filename.5B.5D.2C_rem oteFormat.5B.5D.2C_bool:bFileFirst_.3D_false.2C_bo ol:bExtra_.3D_false.2C_extra_.3D_0.2C_bool:bLocal_ .3D_false.2C_bool:bPassTag_.3D_false.29

Can you also tell and explain me if is there any way to get a value from a file with single function like dini_Get() on Y_ini?

I want to use that function at here, dini_int to that function.


if(strfind(PlayerName(playerid), "[Dr]",false) != -1) {
if(!fexist(file) || dini_Int(file,"Member") == 0) {
format(string,128,">> %s (%d) has been kicked from server. Reason: Fake Clan Member.",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED, string);
SendClientMessage(playerid, COLOR_RED, "You have been kicked from server for using our clan although you're not a member of it.");
SetTimerEx("kick_player",500,false,"d",playerid);
return 0;
}
}