02.03.2012, 13:59
I have this Passport test for players that i want to make it when the player registers too, how can i make it when a new player registers it gives him the test and if he failed in it he gets kicked?
Код:
if(OnPassportTest[playerid] == 1) { if(TestStep[playerid] == 1) { if(strcmp(text, "c", true) == 0) { ClearChatbox(playerid, 10); TestStep[playerid] = 2; SendClientMessage(playerid, COLOR_YELLOW,"2 - What does 'In Character (IC)' Stands for?"); ClearChatbox(playerid, 4); SendClientMessage(playerid, COLOR_YELLOW,"a. The Place where i can kill everyone with my car"); SendClientMessage(playerid, COLOR_YELLOW,"b. The place where i can hack money and give it away."); SendClientMessage(playerid, COLOR_YELLOW,"c. The place where i must Roleplay what i am."); SendClientMessage(playerid, COLOR_YELLOW,"d. The place where i must take a gun and kill everyone."); SendClientMessage(playerid, COLOR_YELLOW,"e. The place where i must annoy others for admin status."); return 0; } else { SendClientMessage(playerid, COLOR_YELLOW,"* You have failed your test, now you can do it again in Five Hours."); PlayerInfo[playerid][pPassportTime] = 21600; OnPassportTest[playerid] = 0; TestStep[playerid] = 0; return 0; } } else if(TestStep[playerid] == 2) { if(strcmp(text, "c", true) == 0) { ClearChatbox(playerid, 10); TestStep[playerid] = 3; SendClientMessage(playerid, COLOR_YELLOW,"3 - What does 'Out of Character (OOC)' Stands for?"); ClearChatbox(playerid, 4); SendClientMessage(playerid, COLOR_YELLOW,"a. The place where i can kill everyone and then quit the server."); SendClientMessage(playerid, COLOR_YELLOW,"b. The place where i can abuse my commands and force the roleplay on others."); SendClientMessage(playerid, COLOR_YELLOW,"c. The place where i can hack money and give it away for free."); SendClientMessage(playerid, COLOR_YELLOW,"d. The place where i can beg for admin status then abusing it."); SendClientMessage(playerid, COLOR_YELLOW,"e. The place where i can act like myself and not my character."); return 0; } else { SendClientMessage(playerid, COLOR_YELLOW,"* You have failed your test, now you can do it again in Five Hours."); PlayerInfo[playerid][pPassportTime] = 21600; OnPassportTest[playerid] = 0; TestStep[playerid] = 0; return 0; } } else if(TestStep[playerid] == 3) { if(strcmp(text, "e", true) == 0) { ClearChatbox(playerid, 10); TestStep[playerid] = 4; SendClientMessage(playerid, COLOR_YELLOW,"4 - What does 'Powergaming' Stands for?"); ClearChatbox(playerid, 4); SendClientMessage(playerid, COLOR_YELLOW,"a. That i can kill anyone without a reason."); SendClientMessage(playerid, COLOR_YELLOW,"b. That i force the roleplay on other people."); SendClientMessage(playerid, COLOR_YELLOW,"c. That i can use my helicopter to kill anyone."); SendClientMessage(playerid, COLOR_YELLOW,"d. That i can drive by on my car and kill everyone."); SendClientMessage(playerid, COLOR_YELLOW,"e. That i can hack and fly around san andreas."); return 0; } else { SendClientMessage(playerid, COLOR_YELLOW,"* You have failed your test, now you can do it again in Five Hours."); PlayerInfo[playerid][pPassportTime] = 21600; OnPassportTest[playerid] = 0; TestStep[playerid] = 0; return 0; } } else if(TestStep[playerid] == 4) { if(strcmp(text, "b", true) == 0) { ClearChatbox(playerid, 10); TestStep[playerid] = 5; SendClientMessage(playerid, COLOR_YELLOW,"5 - What does 'Metagaming' Stands for?"); ClearChatbox(playerid, 4); SendClientMessage(playerid, COLOR_YELLOW,"a. The use of a car to kill everyone with it."); SendClientMessage(playerid, COLOR_YELLOW,"b. The use of hacks and abusing the possible script bugs."); SendClientMessage(playerid, COLOR_YELLOW,"c. The use of guns to kill anyone without a reason."); SendClientMessage(playerid, COLOR_YELLOW,"d. The use of Out of Character information at In Character."); SendClientMessage(playerid, COLOR_YELLOW,"e. The use of commands to force the rolepaly on someone else."); return 0; } else { SendClientMessage(playerid, COLOR_YELLOW,"* You have failed your test, now you can do it again in Five Hours."); PlayerInfo[playerid][pPassportTime] = 21600; OnPassportTest[playerid] = 0; TestStep[playerid] = 0; return 0; } } else if(TestStep[playerid] == 5) { if(strcmp(text, "d", true) == 0) { ClearChatbox(playerid, 10); TestStep[playerid] = 6; SendClientMessage(playerid, COLOR_YELLOW,"6 - Where is the LSPD placed on?"); ClearChatbox(playerid, 4); SendClientMessage(playerid, COLOR_YELLOW,"a. Commerce, Los Santos."); SendClientMessage(playerid, COLOR_YELLOW,"b. Pershing Square, Los Santos."); SendClientMessage(playerid, COLOR_YELLOW,"c. Creek, Las Venturas."); SendClientMessage(playerid, COLOR_YELLOW,"d. Queens, San Fierro."); SendClientMessage(playerid, COLOR_YELLOW,"e. Roca Escalante, Las Venturas."); return 0; } else { SendClientMessage(playerid, COLOR_YELLOW,"* You have failed your test, now you can do it again in Five Hours."); PlayerInfo[playerid][pPassportTime] = 21600; OnPassportTest[playerid] = 0; TestStep[playerid] = 0; return 0; } } else if(TestStep[playerid] == 6) { if(strcmp(text, "b", true) == 0) { ClearChatbox(playerid, 10); TestStep[playerid] = 7; SendClientMessage(playerid, COLOR_YELLOW,"7 - What should i do when i get shoot?"); ClearChatbox(playerid, 4); SendClientMessage(playerid, COLOR_YELLOW,"a. Run in circles and beat the attacker."); SendClientMessage(playerid, COLOR_YELLOW,"b. Act scared like in real life."); SendClientMessage(playerid, COLOR_YELLOW,"c. Take a gun out of your ass and shoot him."); SendClientMessage(playerid, COLOR_YELLOW,"d. Take cover on a wall and PM a cop to save you."); SendClientMessage(playerid, COLOR_YELLOW,"e. Use /ad and ask for help in Caps."); return 0; } else { SendClientMessage(playerid, COLOR_YELLOW,"* You have failed your test, now you can do it again in Five Hours."); PlayerInfo[playerid][pPassportTime] = 21600; OnPassportTest[playerid] = 0; TestStep[playerid] = 0; return 0; } } else if(TestStep[playerid] == 7) { if(strcmp(text, "b", true) == 0) { ClearChatbox(playerid, 10); TestStep[playerid] = 8; SendClientMessage(playerid, COLOR_YELLOW,"8 - What should i do when an admin tells me something?"); ClearChatbox(playerid, 4); SendClientMessage(playerid, COLOR_YELLOW,"a. Ignore him and keep playing"); SendClientMessage(playerid, COLOR_YELLOW,"b. Quit and never come back."); SendClientMessage(playerid, COLOR_YELLOW,"c. Do what he says and stay calm."); SendClientMessage(playerid, COLOR_YELLOW,"d. Spam his pm's with insults then Quit."); SendClientMessage(playerid, COLOR_YELLOW,"e. Hack and kill him with a minigun."); return 0; } else { SendClientMessage(playerid, COLOR_YELLOW,"* You have failed your test, now you can do it again in Five Hours."); PlayerInfo[playerid][pPassportTime] = 21600; OnPassportTest[playerid] = 0; TestStep[playerid] = 0; return 0; } } else if(TestStep[playerid] == 8) { if(strcmp(text, "c", true) == 0) { ClearChatbox(playerid, 10); TestStep[playerid] = 9; SendClientMessage(playerid, COLOR_YELLOW,"9 - What should i do when an admins punishes my friend?"); ClearChatbox(playerid, 4); SendClientMessage(playerid, COLOR_YELLOW,"a. Use /ad to moan about the punishment with caps."); SendClientMessage(playerid, COLOR_YELLOW,"b. PM the admin and moan about the punishment."); SendClientMessage(playerid, COLOR_YELLOW,"c. Spam /atalk to moan about the punishment."); SendClientMessage(playerid, COLOR_YELLOW,"d. Report him at the forums for abuser."); SendClientMessage(playerid, COLOR_YELLOW,"e. Stay Calm, with the mouth shut, You can't comment on punishments."); return 0; } else { SendClientMessage(playerid, COLOR_YELLOW,"* You have failed your test, now you can do it again in Five Hours."); PlayerInfo[playerid][pPassportTime] = 21600; OnPassportTest[playerid] = 0; TestStep[playerid] = 0; return 0; } } else if(TestStep[playerid] == 9) { if(strcmp(text, "e", true) == 0) { ClearChatbox(playerid, 10); TestStep[playerid] = 10; SendClientMessage(playerid, COLOR_YELLOW,"10 - What should i do if a hacker gives me hacked money?"); ClearChatbox(playerid, 4); SendClientMessage(playerid, COLOR_YELLOW,"a. Keep the money, use it to buy nice things such lots of weapons."); SendClientMessage(playerid, COLOR_YELLOW,"b. Give the money back, and ignore him without telling admins."); SendClientMessage(playerid, COLOR_YELLOW,"c. Use /charity with the money and never mention nothing about the hacker."); SendClientMessage(playerid, COLOR_YELLOW,"d. Give to any admin the money and report the hacker."); SendClientMessage(playerid, COLOR_YELLOW,"e. Quit, and come back in a few hours and waste the money."); return 0; } else { SendClientMessage(playerid, COLOR_YELLOW,"* You have failed your test."); PlayerInfo[playerid][pPassportTime] = 21600; OnPassportTest[playerid] = 0; TestStep[playerid] = 0; return 0; } } else if(TestStep[playerid] == 10) { if(strcmp(text, "d", true) == 0) { ClearChatbox(playerid, 10); TestStep[playerid] = 0; SendClientMessage(playerid, COLOR_GREEN,"You have passed your test, you're now a Legal Citizen!"); PlayerInfo[playerid][pPassport] = 1; return 0; } else { SendClientMessage(playerid, COLOR_YELLOW,"* You have failed your test.."); PlayerInfo[playerid][pPassportTime] = 21600; OnPassportTest[playerid] = 0; TestStep[playerid] = 0; return 0; } } }