22.08.2012, 08:53
I tested my code it works
Here it is, crosschecks yours and see if it works
Here it is, crosschecks yours and see if it works
pawn Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define DIALOG_RULES 1
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(rules,5,cmdtext);
return 0;
}
dcmd_rules(playerid,params[])
{
#pragma unused params
new BigString[1900];
strcat(BigString, "\n{FFFFFF}1. {F81414}*******.", 1900 ); //Line 679
strcat(BigString, "\n{FFFFFF}2. {F81414}***********.", 1900 );
strcat(BigString, "\n{FFFFFF}3. {F81414}Do not Spam.", 1900 );
strcat(BigString, "\n{FFFFFF}4. {F81414}Do not use cheats or hacks.", 1900 );
strcat(BigString, "\n{FFFFFF}5. {F81414}*******.", 1900 );
strcat(BigString, "\n{FFFFFF}6. {F81414}************.", 1900 );
strcat(BigString, "\n{FFFFFF}7. {F81414}Never quit to avoid anything.", 1900 );
strcat(BigString, "\n{FFFFFF}8. {F81414}************", 1900 );
strcat(BigString, "\n{FFFFFF}9. {F81414}Never abuse a bug.", 1900 );
strcat(BigString, "\n{FFFFFF}10. {F81414}No mods are allowed.", 1900 );
ShowPlayerDialog(playerid,DIALOG_RULES, DIALOG_STYLE_MSGBOX, "{ff0000}Rules", BigString, "Accept","Ignore");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_RULES :
{
if(!response)
{
SendClientMessage(playerid,color,"You have been kicked because you don't accept our rules!");
Kick(playerid);
return 1;
}
else
{
//Accepted
}
}
}
return 0;
}