11.06.2010, 20:36
Quote:
Originally Posted by DurtyFree
Nice include, but how you Chose the Obtion? Per mouse klick or per Arrows or per Number 1-3?
|
Player TYPES NUMBER into chat and then he chooses some option. If you're going to use options you need to set input parameter to 1 and inputrange to max number of options. So for example, I want
to allow player to choose 5 options. Then I'll do
pawn Код:
ShowPlayerInformation(playerid, "Some title", "Here is text, choose one of five options..~n~1. Option 1~n~2. Option 2~n~3. Option 3~n~4. Option 4~n~Option 5", "mycategory", "mysubcategory", 1, 5);
Then you could indentify it like
pawn Код:
public OnPlayerMsgBoxResponse(playerid, chosen)
{
if(!strcmp(GetInformationCategory(playerid), "mycategory") && !strcmp(GetInformationSubcategory(playerid), "mysubcategory))
{
switch(chosen)
{
case 1:
{
SendClientMessage(playerid, color, "This is option 1 - you got $500000!");
GivePlayerMoney(playerid, 500000);
}
case 2:
{
SendClientMessage(playerid, color, "This is option 2 - you got +7 score);
SetPlayerScore(playerid, GetPlayerScore(playerid)+7);
}
// also up to case 5.. case 1, case 2, case 3, case 4, case 5...
}
}
return 1;
}