26.03.2011, 11:06
Okay so im making RP server from scratch and im having a problem. I get no errors or warnings when compiling, but when I try to get tutorial working:
This is my script:
Tut defined:
but its not working? Whats wrong?
This is my script:
pawn Код:
public OnPlayerConnect(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(TutTime[i] >= 1)
{
TogglePlayerControllable(i, 0);
TutTime[i] += 1;
if(TutTime[i] == 3)
{
SendClientMessage(i, COLOR_YELLOW, "|____Tutorial: The start____|");
SendClientMessage(i, COLOR_YELLOW2, "Hello, I can see you are new, so lets go throught a quick tutorial.");
SendClientMessage(i, COLOR_YELLOW2, "Every player needs to know what he / she can and can't do.");
SendClientMessage(i, COLOR_YELLOW2, "I will give you some information, so please pay attention.");
}
else if(TutTime[i] == 14)
{
SendClientMessage(i, COLOR_YELLOW, "|_____Tutorial: Roleplay server_____|");
}
else if(TutTime[i] == 16)
{
SendClientMessage(i, COLOR_YELLOW2, "This server is an roleplay server.");
SendClientMessage(i, COLOR_YELLOW2, "It means that you must act like you would in real life.");
SendClientMessage(i, COLOR_YELLOW2, "We are not interested in players that are here to Deathmatch.");
SendClientMessage(i, COLOR_YELLOW2, "You name also matters, other players will get used to your chose name.");
SendClientMessage(i, COLOR_YELLOW2, "so its better to have a name like for example: Max_Redlake.");
SendClientMessage(i, COLOR_YELLOW2, "If you want to know more about how to RP, visit our forums and search for topic.");
SendClientMessage(i, COLOR_YELLOW2, "(Our Forums are currently under construction)");
}
else if(TutTime[i] == 32)
{
SendClientMessage(i, COLOR_YELLOW2, "If you are confused and want to ask some information when playing");
SendClientMessage(i, COLOR_YELLOW2, "feel free to ask our admin team using /report.");
SendClientMessage(i, COLOR_YELLOW2, "Dont start to shout or curse at someone, or you might be punished.");
SendClientMessage(i, COLOR_YELLOW2, "Use the commands /o (OOC) /w (Whisper) /sms (if you have phone) to talk to someone.");
}
else if(TutTime[i] == 52)
{
SendClientMessage(i, COLOR_YELLOW, "|____Tutorial: Cheating & Abusing______|");
}
else if(TutTime[i] == 54)
{
SendClientMessage(i, COLOR_YELLOW2, "We hope n0beit was never made and we do not allow players to use it.");
SendClientMessage(i, COLOR_YELLOW2, "Thats why we dont want you or other players to cheat / hack.");
SendClientMessage(i, COLOR_YELLOW2, "If you see someone cheating / hacking, /report right away so he gets punished.");
SendClientMessage(i, COLOR_YELLOW2, "Bug abusing, or in other way stuff abusing is just as bad as cheating / hacking.");
SendClientMessage(i, COLOR_YELLOW2, "So we do not want you to abuse aswell. Simply use /report aswell if you see");
SendClientMessage(i, COLOR_YELLOW2, "someone abusing something.");
}
else if(TutTime[i] == 74)
{
SendClientMessage(i, COLOR_YELLOW, "|___Tutorial: Respect___|");
}
else if(TutTime[i] == 76)
{
SendClientMessage(i, COLOR_YELLOW2, "Firstly I like to start with admins. Respect them in any way.");
SendClientMessage(i, COLOR_YELLOW2, "We are trying to keep everyone satisfied in anyway possible.");
SendClientMessage(i, COLOR_YELLOW2, "Secondly, don't curse / shout / swear at other players.");
SendClientMessage(i, COLOR_YELLOW2, "This will end you up muted / banned. Just treat other players with respect");
SendClientMessage(i, COLOR_YELLOW2, "The same way you want to be respected.");
}
else if(TutTime[i] == 96)
{
SendClientMessage(i, COLOR_YELLOW, "|___Tutorial: Drive-by____|");
}
else if(TutTime[i] == 98)
{
SendClientMessage(i, COLOR_YELLOW2, "We do not allow drive-by on this server since its lame and simple to kill.");
SendClientMessage(i, COLOR_YELLOW2, "And it is deathmatching, which is definately against the rules.");
SendClientMessage(i, COLOR_YELLOW2, "Don't do this if you dont want to end up banned.");
}
else if(TutTime[i] == 108)
{
SendClientMessage(i, COLOR_YELLOW, "|___Tutorial: Language & Advertising___|");
}
else if(TutTime[i] == 110)
{
SendClientMessage(i, COLOR_YELLOW2, "We would like you to use English in all chats.");
SendClientMessage(i, COLOR_YELLOW2, "Ofcourse you can talk in your own language in /b /w & /sms chats.");
SendClientMessage(i, COLOR_YELLOW2, "Advertising is not tolerated in anyway. It will end you up banned.");
}
else if(TutTime[i] == 119)
{
SendClientMessage(i, COLOR_YELLOW, "|___Tutorial: Reaching the end___|");
}
else if(TutTime[i] == 121)
{
SendClientMessage(i, COLOR_YELLOW2, "So thats it, pretty obvious, but its the rules we want you to know.");
SendClientMessage(i, COLOR_YELLOW2, "Just keep reminding them and remember to have fun.");
SendClientMessage(i, COLOR_YELLOW2, "Greetings from: Mystic-RP - Administration team.");
}
else if(TutTime[i] == 127)
{
PlayerInfo[playerid][pTutorial] = 1;
TutTime[i] = 0;
TogglePlayerControllable(i, 1);
SpawnPlayer(i);
print("Tutorial perfectly Running");
}
}
}
return 1;
}
pawn Код:
new TutTime[MAX_PLAYERS];