Registration System. -
Код:
if(RegistrationQuestion[playerid] > 0)
{
if(RegistrationQuestion[playerid] == 1)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("2", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("2")))
{
SendClientMessage(playerid, COLOR_WHITE, "Excellent!");
SendClientMessage(playerid, COLOR_LIGHTRED, "What is IC?");
SendClientMessage(playerid, COLOR_WHITE, "1. In Charge");
SendClientMessage(playerid, COLOR_WHITE, "2. In Cheaters");
SendClientMessage(playerid, COLOR_WHITE, "3. In Character")
RegistrationQuestion[playerid] = 2;
return 0;
}
else
{
format(string, sizeof(string), "Go to our forums and read our rules. >> %s <<");
SendClientMessage(playerid, COLOR_WHITE, string);
Kick(playerid);
return 0;
}
}
else if(RegistrationQuestion[playerid] == 2)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("3", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("3")))
{
SendClientMessage(playerid, COLOR_WHITE, "Excellent!");
SendClientMessage(playerid, COLOR_LIGHTRED, "If you need help, what will you do?");
SendClientMessage(playerid, COLOR_WHITE, "1. Ask on /report");
SendClientMessage(playerid, COLOR_WHITE, "2. Ask a helper/admin on duty to help you.");
SendClientMessage(playerid, COLOR_WHITE, "3. Spam for help on /report");
RegistrationQuestion[playerid] = 3;
return 0;
}
else
{
format(string, sizeof(string), "Go to our forums and read our rules. >> %s <<");
SendClientMessage(playerid, COLOR_WHITE, string);
Kick(playerid);
return 0;
}
}
else if(RegistrationQuestion[playerid] == 3)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("2", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("2")))
{
SendClientMessage(playerid, COLOR_WHITE, "Excellent!");
SendClientMessage(playerid, COLOR_LIGHTRED, "If you see a cheater, what will you do?");
SendClientMessage(playerid, COLOR_WHITE, "1. Report him on /helpme");
SendClientMessage(playerid, COLOR_WHITE, "2. Report him on /report and take some SS for forums if admins don't respond.");
SendClientMessage(playerid, COLOR_WHITE, "3. Get a gun to kill him.");
RegistrationQuestion[playerid] = 4;
return 0;
}
else
{
format(string, sizeof(string), "Go to our forums and read our rules. >> %s <<");
SendClientMessage(playerid, COLOR_WHITE, string);
Kick(playerid);
return 0;
}
}
else if(RegistrationQuestion[playerid] == 4)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("2", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("2")))
{
SendClientMessage(playerid, COLOR_WHITE, "Excellent!");
SendClientMessage(playerid, COLOR_LIGHTRED, "If you got banned for something you didn't do, what will you do:");
SendClientMessage(playerid, COLOR_WHITE, "1. Post ban apeal on forums.");
SendClientMessage(playerid, COLOR_WHITE, "2. Change my IP and ask admins IG why i got banned.");
SendClientMessage(playerid, COLOR_WHITE, "3. Try to get in contact with the owner on MSN.");
RegistrationQuestion[playerid] = 5;
return 0;
}
else
{
format(string, sizeof(string), "Go to our forums and read our rules. >> %s <<");
SendClientMessage(playerid, COLOR_WHITE, string);
Kick(playerid);
return 0;
}
}
else if(RegistrationQuestion[playerid] == 5)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("1", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("1")))
{
SendClientMessage(playerid, COLOR_WHITE, "Excellent!");
SendClientMessage(playerid, COLOR_LIGHTRED, "Which of these /do commands are used properly?");
SendClientMessage(playerid, COLOR_WHITE, "1. /do lag test.");
SendClientMessage(playerid, COLOR_WHITE, "2. /do ID 32 is cheating!");
SendClientMessage(playerid, COLOR_WHITE, "3. /do car window is open.");
RegistrationQuestion[playerid] = 6;
return 0;
}
else
{
format(string, sizeof(string), "Go to our forums and read our rules. >> %s <<");
SendClientMessage(playerid, COLOR_WHITE, string);
Kick(playerid);
return 0;
}
}
else if(RegistrationQuestion[playerid] == 6)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("3", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("3")))
{
SendClientMessage(playerid, COLOR_WHITE, "Excellent!");
SendClientMessage(playerid, COLOR_LIGHTRED, "If you don't like some staff member, what will you do:");
SendClientMessage(playerid, COLOR_WHITE, "1. Contact owner");
SendClientMessage(playerid, COLOR_WHITE, "2. Contact some high level administrator");
SendClientMessage(playerid, COLOR_WHITE, "3. Post a Complain/Report topic on the forums");
RegistrationQuestion[playerid] = 7;
return 0;
}
else
{
format(string, sizeof(string), "Go to our forums and read our rules. >> %s <<");
SendClientMessage(playerid, COLOR_WHITE, string);
Kick(playerid);
return 0;
}
}
else if(RegistrationQuestion[playerid] == 7)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("3", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("3")))
{
SendClientMessage(playerid, COLOR_WHITE, "Excellent!");
SendClientMessage(playerid, COLOR_LIGHTRED, "If you want to be a staff member, what will you do:");
SendClientMessage(playerid, COLOR_WHITE, "1. Ask a high level admin to add me in helper/gm/admin team");
SendClientMessage(playerid, COLOR_WHITE, "2. Apply on the forums");
SendClientMessage(playerid, COLOR_WHITE, "3. Contact the owner");
RegistrationQuestion[playerid] = 8;
return 0;
}
else
{
format(string, sizeof(string), "Go to our forums and read our rules. >> %s <<");
SendClientMessage(playerid, COLOR_WHITE, string);
Kick(playerid);
return 0;
}
}
else if(RegistrationQuestion[playerid] == 8)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("2", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("2")))
{
SendClientMessage(playerid, COLOR_WHITE, "Excellent!");
SendClientMessage(playerid, COLOR_LIGHTRED, "If you need money, what will you do:");
SendClientMessage(playerid, COLOR_WHITE, "1. Take a job and try to earn it RP way");
SendClientMessage(playerid, COLOR_WHITE, "2. Ask an admin to give you");
RegistrationQuestion[playerid] = 9;
return 0;
}
else
{
format(string, sizeof(string), "Go to our forums and read our rules. >> %s <<");
SendClientMessage(playerid, COLOR_WHITE, string);
Kick(playerid);
return 0;
}
}
else if(RegistrationQuestion[playerid] == 9)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("1", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("1")))
{
SendClientMessage(playerid, COLOR_WHITE, "Excellent!");
SendClientMessage(playerid, COLOR_LIGHTRED, "Did you read our rules on our forums and will you follow them?");
SendClientMessage(playerid, COLOR_WHITE, "1. Yes");
SendClientMessage(playerid, COLOR_WHITE, "2. No");
RegistrationQuestion[playerid] = 10;
return 0;
}
else
{
format(string, sizeof(string), "Go to our forums and read our rules. >> %s <<");
SendClientMessage(playerid, COLOR_WHITE, string);
Kick(playerid);
return 0;
}
}
else if(RegistrationQuestion[playerid] == 10)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("1", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("1")) || (strcmp("Yes", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Yes")))
{
SetZaiatMoney(playerid, 0);
GiveZaiatMoney(playerid, 3000);
SetPlayerPos(playerid, 1499.8129,1308.9163,1093.2891);
SetPlayerFacingAngle(playerid, 93.3274);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 0);
ShowDialog(playerid, 0);
return 0;
}
else
{
ClearChatbox(playerid, 10);
format(string, sizeof(string), " We can't let you in if you don't accept our rules. To check them, use %s!");
SendClientMessage(playerid, COLOR_WHITE, string);
Kick(playerid);
return 0;
}
}
}
"array sizes do not match, or destination array is too small" ERROR comes on every RegistrationQuestion[playerid] =
Re: Registration System. -
depending on how large is your forum adress. BTW : on your format is missing something :
. That something should be a array that "holds" the adress of your forum , you need to but something there because you used
and that need to be replaced with something ... i hope you understand i'm dot so good at explaining
That will result a message like : Go to our forums and read our rules. >>
BTW: i'm 90% sure that your errors are from that format , because your errors number is equal to how many times you format that string ...