Server Crash
#1

Hello,

I finally got rid of the most errors that I had, but now when I launch my server and join it loads till the character selection and then my server goes off-line.
It just shuts down without warning, I had an error before and that was about "AllowPlayerTeleport" and what it said was "AllowPlayerTeleport<> : funtion is deprecated. Please see OnPlayerClickMap<>" I've deleted both the AllowPlayerTeleport and OnPlayerClickMap lines from my script but now i have another error that I've explained in the first sentence of this thread.

Please help.
Reply
#2

Show us OnPlayerRequestClass and OnPlayerRequestSpawn
Reply
#3

public OnPlayerRequestClass( playerid, classid )
{
SetPlayerClass( playerid, classid );
SetPlayerColor( playerid, COLOR_INACTIVE );
PlayerPlaySound(playerid, 1097,-119.9460,23.1096,12.223; //music, duh

TextDrawHideForPlayer(playerid, Text:vagos);
TextDrawHideForPlayer(playerid, Text:cops);
TextDrawHideForPlayer(playerid, Text:aztecas);
TextDrawHideForPlayer(playerid, Text:ballas);
TextDrawHideForPlayer(playerid, Text:dealers);
TextDrawHideForPlayer(playerid, Text:bikers);
TextDrawHideForPlayer(playerid, Text:grove);
TextDrawHideForPlayer(playerid, Text:admins);
TextDrawHideForPlayer(playerid, Text:admin);
TextDrawHideForPlayer(playerid, Text:army);
TextDrawHideForPlayer(playerid, Text:low);
TextDrawHideForPlayer(playerid, Textdraw12);
TextDrawHideForPlayer(playerid, Textdraw13);
TextDrawHideForPlayer(playerid, Textdraw14);
TextDrawHideForPlayer(playerid, Textdraw15);
HideMenuForPlayer(Healtmenu, playerid);

SetPlayerPos(playerid, player_x,player_y,player_z);
SetPlayerFacingAngle(playerid, player_angle);
SetPlayerCameraPos(playerid, camera_x,camera_y,camera_z);
SetPlayerCameraLookAt(playerid, player_x,player_y,player_z);

switch(classid)
{
case 0..3:
{
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1 ,0,0,0,-1); //smooth dancing. It's most fitting to the music
TextDrawShowForPlayer(playerid,Aztecass);
TextDrawHideForPlayer(playerid, Text:vagoss);
TextDrawHideForPlayer(playerid, Text:adminss);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw;
TextDrawHideForPlayer(playerid, Textdraw9);
TextDrawHideForPlayer(playerid, Textdraw10);
TextDrawHideForPlayer(playerid, Textdraw11);
}
case 4..7:
{
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1 ,0,0,0,-1); //smooth dancing. It's most fitting to the music
TextDrawHideForPlayer(playerid, Text:Aztecass);
TextDrawShowForPlayer(playerid,vagoss);
TextDrawHideForPlayer(playerid, Text:ballass);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw6);
TextDrawShowForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);


}
case 8..11:
{
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1 ,0,0,0,-1); //smooth dancing. It's most fitting to the music
TextDrawHideForPlayer(playerid, Text:vagoss);
TextDrawShowForPlayer(playerid,ballass);
TextDrawHideForPlayer(playerid, Text:groves);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);

}
case 12..15:
{
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1 ,0,0,0,-1); //smooth dancing. It's most fitting to the music
TextDrawHideForPlayer(playerid, Text:ballass);
TextDrawShowForPlayer(playerid,groves);
TextDrawHideForPlayer(playerid, Text:dealerss);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw6);
TextDrawShowForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
}
case 16..19:
{

ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1 ,0,0,0,-1); //smooth dancing. It's most fitting to the music
TextDrawHideForPlayer(playerid, Text:groves);
TextDrawShowForPlayer(playerid,dealerss);
TextDrawHideForPlayer(playerid, Text:copss);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);

}
case 20..23:
{
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1 ,0,0,0,-1); //smooth dancing. It's most fitting to the music
TextDrawHideForPlayer(playerid, Text:dealerss);
TextDrawShowForPlayer(playerid,copss);
TextDrawHideForPlayer(playerid, Text:bikerss);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw6);
TextDrawShowForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);

}
case 24..27:
{

ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1 ,0,0,0,-1); //smooth dancing. It's most fitting to the music
TextDrawHideForPlayer(playerid, Text:copss);
TextDrawShowForPlayer(playerid,bikerss);
TextDrawHideForPlayer(playerid, Text:chickenss);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw;
TextDrawHideForPlayer(playerid, Textdraw9);
TextDrawHideForPlayer(playerid, Textdraw10);
TextDrawHideForPlayer(playerid, Textdraw11);
}
case 28..29:
{
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1 ,0,0,0,-1); //smooth dancing. It's most fitting to the music
TextDrawHideForPlayer(playerid, Text:armys);
TextDrawHideForPlayer(playerid, Text:bikerss);
TextDrawShowForPlayer(playerid,chickenss);
SendClientMessage( playerid, COLOR_RED, "only Admins!" );
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);
TextDrawShowForPlayer(playerid, Textdraw;
TextDrawShowForPlayer(playerid, Textdraw9);
TextDrawShowForPlayer(playerid, Textdraw10);
TextDrawShowForPlayer(playerid, Textdraw11);

}
case 30..31:
{
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1 ,0,0,0,-1); //smooth dancing. It's most fitting to the music
TextDrawHideForPlayer(playerid, Text:lows);
TextDrawHideForPlayer(playerid, Text:chickenss);
TextDrawShowForPlayer(playerid,armys);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw;
TextDrawHideForPlayer(playerid, Textdraw9);
TextDrawHideForPlayer(playerid, Textdraw10);
TextDrawHideForPlayer(playerid, Textdraw11);

}
case 32..33:
{
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1 ,0,0,0,-1); //smooth dancing. It's most fitting to the music
TextDrawHideForPlayer(playerid, Text:adminss);
TextDrawHideForPlayer(playerid, Text:armys);
TextDrawShowForPlayer(playerid,lows);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw6);
TextDrawShowForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw;
TextDrawHideForPlayer(playerid, Textdraw9);
TextDrawHideForPlayer(playerid, Textdraw10);
TextDrawHideForPlayer(playerid, Textdraw11);

}
case 34..36:
{
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1 ,0,0,0,-1); //smooth dancing. It's most fitting to the music
TextDrawHideForPlayer(playerid, Text:Aztecass);
TextDrawHideForPlayer(playerid, Text:lows);
TextDrawShowForPlayer(playerid,adminss);
TextDrawShowForPlayer(playerid, Textdraw;
TextDrawShowForPlayer(playerid, Textdraw9);
TextDrawShowForPlayer(playerid, Textdraw10);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);

}
}
if (PlayerInfo[playerid][SpawnDance]) PlayerInfo[playerid][SpawnTimer] = SetTimerEx("MoveCamera", moving_speed, true, "i", playerid);
PlayerInfo[playerid][SpawnDance] = false; //preventing the timer to execute again

return 1;
}

-----------------------------------------------------------------------------------------------------------

public OnPlayerRequestSpawn(playerid)
{
new playrname[ MAX_PLAYER_NAME ], string[ 256 ];



if(gTeam[playerid] == TEAM_AZTECAS) {
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined The Aztecas.", playrname, playerid);
SendClientMessageToAll( COLOR_YELLOW, string );
}
else if(gTeam[playerid] == TEAM_VAGOS) {
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined The Vagos.", playrname, playerid);
SendClientMessageToAll( COLOR_YELLOW, string );
}
else if(gTeam[playerid] == TEAM_GROVE) {
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined The Grove.", playrname, playerid);
SendClientMessageToAll( COLOR_YELLOW, string );
}
else if(gTeam[playerid] == TEAM_DEALERS) {
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined The Drugs.", playrname, playerid);
SendClientMessageToAll( COLOR_YELLOW, string );
}
else if(gTeam[playerid] == TEAM_COPS) {
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined The Cops.", playrname, playerid);
SendClientMessageToAll( COLOR_YELLOW, string );
}
else if(gTeam[playerid] == TEAM_BIKERS) {
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined The Bikers.", playrname, playerid);
SendClientMessageToAll( COLOR_YELLOW, string );
}
else if(gTeam[playerid] == TEAM_BALLAS) {
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined The Ballas.", playrname, playerid);
SendClientMessageToAll( COLOR_YELLOW, string );
}
else if(gTeam[playerid] == TEAM_ADMINS) {
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined The Chickens.", playrname, playerid);
SendClientMessageToAll( COLOR_YELLOW, string );
}
else if(gTeam[playerid] == TEAM_ARMY) {
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined The Army.", playrname, playerid);
SendClientMessageToAll( COLOR_YELLOW, string );
}
else if(gTeam[playerid] == TEAM_LOW) {
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined The Low Riders.", playrname, playerid);
SendClientMessageToAll( COLOR_YELLOW, string );
}
else if(gTeam[playerid] == TEAM_ADMIN) {
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined The Admins.", playrname, playerid);
SendClientMessageToAll( COLOR_YELLOW, string );
}
return 1;

}
------------------------------------------------------------------------------------------------------------
i hope you can help
Reply
#4

For textdraw... when you create new variable you use
pawn Код:
new Text:Textdraw0;
but when you use it somewhere else it's only Textdraw0. Ex.
pawn Код:
TextDrawHideForPlayer(playerid,Textdraw0);
That may cause problem
Reply
#5

i fixed it but it is not the text draws.

it still shut down

but before i had a error: AllowPlayerTeleport<> : funtion is deprecated. Please see OnPlayerClickMap<>

i just deleted allowplayerteleport and it still shut down
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)