23.03.2014, 00:43
How can i make something similar??
new
bool:SettingInfo[MAX_PLAYERS char],
bool:ShowTeles[MAX_PLAYERS char],
bool:AllowGoto[MAX_PLAYERS char],
bool:AllowPM[MAX_PLAYERS char]
;
static const Opt[][] = {"~g~OFF", "~r~ON"};
format(str,sizeof(str),"\
~y~~h~1 ~w~- Show Teleports - %s~n~\
~y~~h~2 ~w~- Allow Goto - %s~n~\
~y~~h~3 ~w~- Allow PM - %s",
Opt[ShowTeles{playerid}],Opt[AllowGoto{playerid}],Opt[AllowPM{playerid}]);
PlayerTextDrawSetString(playerid, SettingsTextDraw, str);
TextDrawShowForPlayer(playerid, TextDrawWithGreenSettings);
PlayerTextDrawShow(playerid, SettingsTextDraw);
TextDrawShowForPlayer(playerid, TextDrawWithLMB_Info);
SettingInfo{playerid} = true;
if(newkeys & KEY_FIRE && SettingInfo{playerid})
{
SettingInfo{playerid} = false;
TextDrawHideForPlayer(playerid, TextDrawWithGreenSettings);
PlayerTextDrawHide(playerid, SettingsTextDraw);
TextDrawHideForPlayer(playerid, TextDrawWithLMB_Info);
return 0;
}
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
//
Opt[ShowTeles{playerid}], Opt[AllowGoto{playerid}], Opt[AllowPM{playerid}]);
(Opt[ShowTeles(playerid)], Opt[AllowGoto(playerid], Opt[AllowPM(playerid)]);
new Opt[ShowTeles{playerid}], Opt[AllowGoto{playerid}], Opt[AllowPM{playerid}];
new Opt[ShowTeles(playerid)], Opt[AllowGoto(playerid)], Opt[AllowPM(playerid)];