if(strcmp(cmd, "/tlaws", true) == 0) //
{
if(IsPlayerConnected(playerid))
{
ShowPlayerDialog(playerid,1523,DIALOG_STYLE_MSGBOX,"{FF0000}Traffic Laws{FFFFFF}","\n\
1. ALWAYS stop to red. You may turn right on red after coming to a full stop if the road is clear.\n\
2. Civilians have ALWAYS priority,stop and let them pass.\n\
3. Keep in the Speed limits,in-town limit is 50mp/h and on the high traffic roads is 90-120mp/h\n\
4. Always Yeld to emegercy vehicles such LSPD,LSFD,they have priority.\n\
5. ALWAYS drive on the right side of the road.","AGREE","");
}
return 1;
}
if(strcmp(cmd, "/tlaws", true) == 0)
if(strcmp(cmd, "/tlaws", true) == 0) //
{
if(IsPlayerConnected(playerid))
{
ShowPlayerDialog(playerid,1523,DIALOG_STYLE_MSGBOX,"{FF0000}Traffic Laws{FFFFFF}","\n\1. ALWAYS stop to red. You may turn right on red after coming to a full stop if the road is clear.\n2. Civilians have ALWAYS priority,stop and let them pass.\n3. Keep in the Speed limits,in-town limit is 50mp/h and on the high traffic roads is 90-120mp/h\n4. Always Yeld to emegercy vehicles such LSPD,LSFD,they have priority.\n5. ALWAYS drive on the right side of the road.","AGREE","Close");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 1523:// Our dialog!
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
// Codes here ETC ..
}
case 1: // The second item listed
{
// Codes here ETC ..
}
case 2: // The third item listed
{
// Codes here ETC ..
case 3: // The third item listed
{
// Codes here ETC ..
}
case 4:
{
// Codes here ETC ..
}
}
}
}
}
return 1;
}
if (strcmp("/tlaws", cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
ShowPlayerDialog(playerid,1523,DIALOG_STYLE_MSGBOX,"{FF0000}Traffic Laws{FFFFFF}","\n\
1. ALWAYS stop to red. You may turn right on red after coming to a full stop if the road is clear.\n\
2. Civilians have ALWAYS priority,stop and let them pass.\n\
3. Keep in the Speed limits,in-town limit is 50mp/h and on the high traffic roads is 90-120mph\n\
4. Always Yeld to emegercy vehicles such LSPD,LSFD,they have priority.\n\
5. ALWAYS drive on the right side of the road.","AGREE","");
}
return 1;
}
The 0 is the level that a player got to be to use that command
|
And that's what you have to do . You leave it empty and it will appear as a textbox . You have to do that because you are using a messagebox function , otherwise don't use the messagebox function and make it appear as a "ClientMessage" !
|
if (strcmp("/tlaws", cmdtext, true, 10) == 0)
and then,why do we have the MSGBOX dialogues?are you kidding me?
pds2012,thank you for answering to my post.Actually i cant test it right now,cause i am on my iPad,but can you please explain me what is this "10" on the command? PHP код:
|
and then,why do we have the MSGBOX dialogues?are you kidding me?
pds2012,thank you for answering to my post.Actually i cant test it right now,cause i am on my iPad,but can you please explain me what is this "10" on the command? PHP код:
|