TWO help problems, I think they're easy for you.. -
_Khaled_ - 22.08.2012
Hmm
pawn Код:
dcmd_rules(playerid)
{
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;
}
Код:
D:\SAMP\Server\gamemodes\****.pwn(679) : warning 202: number of arguments does not match definition
D:\SAMP\Server\gamemodes\****pwn(679) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
I don't keep warnings....
And What's the Action should I write to kick a player..
Like
pawn Код:
else
{
SendClientMessage(playerid,0xFF0000FF,"You have been kicked because you don't accept our rules !");
Kick(playerid);
}
If that's right, it's not kicking
Re: TWO help problems, I think they're easy for you.. -
_Khaled_ - 22.08.2012
Anyone?
Re: TWO help problems, I think they're easy for you.. -
newbienoob - 22.08.2012
1)
pawn Код:
dcmd_rules(playerid)
{
new BigString[1900];
strcat(BigString, "\n{FFFFFF}1. {F81414}*******."); //Line 679
strcat(BigString, "\n{FFFFFF}2. {F81414}***********.");
strcat(BigString, "\n{FFFFFF}3. {F81414}Do not Spam.");
strcat(BigString, "\n{FFFFFF}4. {F81414}Do not use cheats or hacks.");
strcat(BigString, "\n{FFFFFF}5. {F81414}*******.");
strcat(BigString, "\n{FFFFFF}6. {F81414}************.");
strcat(BigString, "\n{FFFFFF}7. {F81414}Never quit to avoid anything.");
strcat(BigString, "\n{FFFFFF}8. {F81414}************");
strcat(BigString, "\n{FFFFFF}9. {F81414}Never abuse a bug.");
strcat(BigString, "\n{FFFFFF}10. {F81414}No mods are allowed.");
ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "{ff0000}Rules", BigString, "Accept","Ignore");
return 1;
}
2)
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_RULES && !response)
{
SendClientMessage(playerid,color,"You have been kicked because you don't accept our rules!");
Kick(playerid);
return 1;
}
return 1;
}
Re: TWO help problems, I think they're easy for you.. -
_Khaled_ - 22.08.2012
Warning are still there..
Re: TWO help problems, I think they're easy for you.. -
grand.Theft.Otto - 22.08.2012
The way Newbienoob did it is correct, I don't know what mistake you made
Re: TWO help problems, I think they're easy for you.. -
[MM]RoXoR[FS] - 22.08.2012
I tested my code 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;
}
Re: TWO help problems, I think they're easy for you.. -
_Khaled_ - 22.08.2012
ITS NOT KICKING HERE!