15.03.2010, 00:54
Hey guys, We'll i'm currently making a new GM from scratch, and yes I'm using MySQL, but I believe my tutorial crashes the server and yet I cant see why so I thought it was time to ask you guys.
My Tutorial Script: (( Yes it is the one from Modertopia, and yes I am going to change it... eventually. ))
Main tutorial script:
I honestly cant find anything, maybe you guys can? thanks.
- Mike.
pawn Code:
-------------------------- Exception At Address: 0x00484850 Registers: EAX: 0x70736552 EBX: 0x01402073 ECX: 0x7FFFFFFE EDX: 0x0012F93F ESI: 0x0012F588 EDI: 0x0012FD6E EBP: 0x0012F5D4 ESP: 0x0012F548 EFLAGS: 0x00010202 Stack: +0000: 0x0012FD20 0x0012F920 0x01402014 0x009E0000 +0010: 0x00000000 0x0047FC6B 0x0012F63C 0x00000007 +0020: 0x00000000 0x0047FC88 0x00000000 0x00000000 +0030: 0x00000000 0x00000000 0x00000000 0xFFFFFFFF +0040: 0x00000020 0x00000000 0x70736552 0xFFFFFFFF +0050: 0x00000000 0x00000001 0x0044BCC1 0x0000000D +0060: 0x0012F63C 0x009E6A40 0x0012F730 0x00000000 +0070: 0x0044DB77 0x0012F64D 0x00000068 0x00000001 +0080: 0x00000002 0x00000003 0x9469295C 0x00120AF4 +0090: 0x00000000 0x00000000 0x00000000 0x009E6A40 +00A0: 0x9469295C 0x00454BE5 0x0012F63C 0x00000001 +00B0: 0x00000002 0x00000003 0x9469295C 0x00000AF4 +00C0: 0x00000000 0x0044FF7C 0x0012F63C 0x00000001 +00D0: 0x00000002 0x00000003 0x9469295C 0x00000AF4 +00E0: 0x00450083 0x00000000 0x00000001 0x004997B0 +00F0: 0x94690AF4 0x00000068 0x00000800 0x00000000 +0100: 0x0012F64D 0x5C061901 0xFFFFAA90 0x000001FF +0110: 0xBEBE2000 0x000000F8 0x0012F665 0x5C061901 +0120: 0xAFAFAA90 0x000001AF 0x00002000 0x00000000 +0130: 0x00000000 0x00000000 0x00000000 0x00000000
pawn Code:
// On Top of Script
new TutorialTimer;
// OnGameModeInit:
TutorialTimer = SetTimer("Tutorial", 1000, 1);
// OnGameModeExit:
KillTimer(TutorialTimer);
pawn Code:
public Tutorial()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(TutTime[i] >= 1)
{
TutTime[i] += 1;
if(PlayerInfo[i][pTut] == 0)
{
if(TutTime[i] == 5)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_GREEN, "|__________ [ WELCOME ] __________|");
SendClientMessage(i, COLOR_WHITE, " ");
SendFormattedMessage(i, COLOR_GRAD1, "Welcome to %s %s, we hope you enjoy your stay!",S_NAME,GPN(i));
SendClientMessage(i, COLOR_GRAD1, "I noticed that your new in town, so here's a quick guide to get you accustomed to life in Los Santos."); SendClientMessage(i, COLOR_YELLOW2, "Every new player needs to know what they can and cannot do.");
SendClientMessage(i, COLOR_GRAD1, "This tutorial will outline some useful information, so please pay attention closely.");
SendClientMessage(i, COLOR_GRAD1, " ");
}
if(TutTime[i] == 15)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_GREEN, "|__________ [ BASIC INFORMATION ] __________|");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_GRAD2, "This is a character based roleplay server, so naturally we're not interested in players that");
SendClientMessage(i, COLOR_GRAD2, "don't know how to roleplay properly or are out to cause trouble.");
SendClientMessage(i, COLOR_GRAD2, "The name you have is your identity. Names have to be firstname_lastname format like David_Smith.");
SendClientMessage(i, COLOR_GRAD2, "If you want to learn more about how to RP, visit our forums and they'll tell you what you need to know.");
SendFormattedMessage(i, COLOR_GRAD2, "(( Our forums can be found here: %s ))",S_URL);
SendClientMessage(i, COLOR_WHITE, " ");
}
if(TutTime[i] == 25)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_GREEN, "|__________ [ REQUESTING HELP ] __________|");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_GRAD3, "Our help system can be accessed with the /help command. Please take a look through it.");
SendClientMessage(i, COLOR_GRAD3, "Alternatively, you can ask a helper or an admin if they can assist you using /helpme.");
SendClientMessage(i, COLOR_GRAD3, "Don't start to shout or curse at someone, just let an admin / helper know and they'll help you out.");
SendClientMessage(i, COLOR_WHITE, " ");
}
if(TutTime[i] == 35)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_GREEN, "|__________ [ EXPLOITS ] __________|");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_GRAD4, "Gaining an unfair advantage over other players using hacks / cheats will not be tolerated.");
SendClientMessage(i, COLOR_GRAD4, "Cheat protection is in place, and will result in an instant ban if you are caught.");
SendClientMessage(i, COLOR_GRAD4, "If you see someone cheating, please report it with /report right away.");
SendClientMessage(i, COLOR_GRAD4, "Any exploits in the script must be reported on our forums as soon as they are found.");
SendFormattedMessage(i, COLOR_GRAD4, "(( Our forums can be found here: %s ))",S_URL);
SendClientMessage(i, COLOR_WHITE, " ");
}
if(TutTime[i] == 45)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_GREEN, "|__________ [ RESPECT ] __________|");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_GRAD5, "Respect first and foremost, the %s Administration Team. They keep the server running.");
SendClientMessage(i, COLOR_GRAD5, "They all try to keep everyone satisfied and try to help everyone in anyway possible.");
SendClientMessage(i, COLOR_GRAD5, "Secondly, do not abuse your fellow players, this will end you up muted / banned.");
SendClientMessage(i, COLOR_GRAD5, "Just treat people with respect, just like you want to be respected.");
SendClientMessage(i, COLOR_WHITE, " ");
}
if(TutTime[i] == 55)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_GREEN, "|__________ [ DRIVE BY's ] __________|");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_GRAD6, "Be careful out on the streets of San Andreas, Drive By Killings are on the rise.");
SendClientMessage(i, COLOR_GRAD6, "Unless you are a cop, You are not allowed to drive by shoot on this server.");
SendClientMessage(i, COLOR_GRAD6, "Your passengers may shoot from the vehicle, but you may not.");
SendClientMessage(i, COLOR_GRAD6, "Abuse of this will lead you to be punished and eventually banned from the server.");
SendClientMessage(i, COLOR_WHITE, " ");
}
if(TutTime[i] == 65)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_GREEN, "|__________ [ LANGUAGES ] __________|");
SendClientMessage(i, COLOR_WHITE, " ");
SendFormattedMessage(i, COLOR_GRAD1, "We encourage people from all diversities here at %s.",S_NAME);
SendClientMessage(i, COLOR_GRAD1, "If you want to talk with someone in your own Language, use the /pme command.");
SendClientMessage(i, COLOR_GRAD1, "You may use your own languages IC like so: \"[German]: But write english here.\"");
SendClientMessage(i, COLOR_GRAD1, "Advertising another server is NOT ALLOWED. This will result in a permenant ban.");
SendClientMessage(i, COLOR_WHITE, " ");
}
if(TutTime[i] == 75)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_GREEN, "|__________ [ TRANSPORT ] __________|");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_GRAD2, "After this tutorial you'll spawn at Los Santos International.");
SendClientMessage(i, COLOR_GRAD2, "As you will need a license to drive a car, so head to the DMV. Look for a car icon on your map.");
SendClientMessage(i, COLOR_GRAD2, "If you don't fancy walking, call a taxi (/call 444) or wait for a bus.");
SendClientMessage(i, COLOR_WHITE, " ");
}
if(TutTime[i] == 85)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_GREEN, "|__________ [ LAW ENFORCEMENT ] __________|");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_GRAD3, "The Local Authorities are in the city for your protection.");
SendClientMessage(i, COLOR_GRAD3, "People who commit crimes will dealt with swiftly or by using force if necessary.");
SendClientMessage(i, COLOR_GRAD3, "To contact a Law Enforcement Officer, call the emergency hotline (/call 911).");
SendClientMessage(i, COLOR_WHITE, " ");
}
if(TutTime[i] == 95)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_GREEN, "|__________ [ EMPLOYMENT ] __________|");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_GRAD4, "There are quite a few ways of earning money in The State.");
SendClientMessage(i, COLOR_GRAD4, "There are employment opportunities all over the city.");
SendClientMessage(i, COLOR_GRAD4, "However, there are some less public friendly ways to making a living.");
SendClientMessage(i, COLOR_WHITE, " ");
}
if(TutTime[i] == 105)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_GREEN, "|__________ [ ACCOUNT LINKING ] __________|");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_GRAD5, "To begin with, you will not be able to use most of the features ingame (licenses, levelling, faction invites, etc).");
SendClientMessage(i, COLOR_GRAD5, "Registering on our website at %s will enable you to link your account,");
SendClientMessage(i, COLOR_GRAD5, "with your game character and will instantly remove these limitations.");
SendClientMessage(i, COLOR_WHITE, "This process will only take a few minutes, so we highly recommend you do it after the tutorial!");
SendClientMessage(i, COLOR_WHITE, " ");
}
if(TutTime[i] == 120)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_GREEN, "|__________ [ END OF THE TUTORIAL ] __________|");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_GRAD6, "So that was it, most of it was pretty obvious but we still want you to remember our rules (/rules).");
SendClientMessage(i, COLOR_GRAD6, "Welcome to the state of San Andreas.");
SendClientMessage(i, COLOR_GRAD6, "As a bonus, we've added $1,000 to your bank account.");
SendClientMessage(i, COLOR_GRAD6, "Good luck!");
SendClientMessage(i, COLOR_WHITE, " ");
}
if(TutTime[i] == 130)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_WHITE, "[HINT]: To call a taxi (/call 444) or wait for a bus.");
TutTime[i] = 0; PlayerInfo[i][pTut] = 1;
TogglePlayerControllable(i, 1);
SetPlayerVirtualWorld(i,0);
SetPlayerSpawn(i);
PlayerInfo[i][pMuted] = 0;
}
}
}
}
}
}
- Mike.

