As players log in, They spawn in hospital. So basically, they died before they logged in.. happens to everyone. How can i fix this? Anybody know? I need it fast! Thanks.. +Rep to someone who can help me :P
Uhmm.. Which part is needed? It's a big GM.. 50k lines.
The part where the player is spawning. Look in the login system part.
Код:
public OnPlayerConnect(playerid)
{
SpeedCamPlayer[playerid] = 0;
LoadPlayerTextDraws(playerid); // packet
SetPlayerVirtualWorld(playerid, 4131); // Fix
new joinstring[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
//format(joinstring, sizeof(joinstring), "02[%d] 03*** %s has joined the server.", playerid, name);
//IRC_GroupSay(groupID, IRC_CHANNEL, joinstring);
format(joinstring,sizeof(joinstring), "%s has connected to the server", NORPN(playerid));
foreach(Player, i)
{
if(JoinMessages[i])
{
SendClientMessage(i, COLOR_YELLOW, joinstring);
}
}
new mrand =random(8); //Numbers randomly selected from 1 to 5
SetPlayerScore(playerid, GetPlayerScore(playerid) +mrand);
//SetPlayerScore(playerid, 3);
CalledCops[playerid] = 0;
GCOff[playerid] = 1;
VehicleOffer[playerid] = 999; // sellcartoplayer
VehiclePrice[playerid] = 0; // sellcartoplayer
// VehicleId[playerid] = -1; // sellcartoplayer
strmid(PlayerInfo[playerid][pNote1], "None", 0, strlen("None"), 255);
PlayerInfo[playerid][pNote1s] = 0;
strmid(PlayerInfo[playerid][pNote2], "None", 0, strlen("None"), 255);
PlayerInfo[playerid][pNote2s] = 0;
strmid(PlayerInfo[playerid][pNote3], "None", 0, strlen("None"), 255);
PlayerInfo[playerid][pNote3s] = 0;
strmid(PlayerInfo[playerid][pNote4], "None", 0, strlen("None"), 255);
PlayerInfo[playerid][pNote4s] = 0;
strmid(PlayerInfo[playerid][pNote5], "None", 0, strlen("None"), 255);
PlayerInfo[playerid][pNote5s] = 0;
LabelActive[playerid] = false; // Vehicle Heatlh Bar
if(IsPlayerNPC(playerid)) { return 1; }
SetTimerEx("Record", 5000, false, "d", playerid);
PlayerNeedsHelp[playerid] = 0;
// Crash Fix - GhoulSlayeR
InvalidNameCheck(playerid);
WaitForBuf[playerid] = false;
OldCar[playerid] = INVALID_VEHICLE_ID;
PassengerSeat[playerid] = 0;
/* TextDrawShowForPlayer(playerid,Black0);
TextDrawShowForPlayer(playerid,Black1);
TextDrawShowForPlayer(playerid,cttext);
TextDrawShowForPlayer(playerid,rptext);
TextDrawShowForPlayer(playerid,vertext);*/
TextDrawShowForPlayer(playerid,Area);
TextDrawShowForPlayer(playerid,Area1);
TextDrawShowForPlayer(playerid,Area2);
TextDrawShowForPlayer(playerid,Area3);
TextDrawShowForPlayer(playerid,Area4);
TextDrawShowForPlayer(playerid,AreaMotd);
// login screen 23-02
/*
TextDrawShowForPlayer(playerid,loginscreen1);
TextDrawShowForPlayer(playerid,loginscreen2);
TextDrawShowForPlayer(playerid,loginscreen3);
TextDrawShowForPlayer(playerid,loginscreen4);
TextDrawShowForPlayer(playerid,loginscreen5);
TextDrawShowForPlayer(playerid,loginscreen6);
TextDrawShowForPlayer(playerid,loginscreen7);
TextDrawShowForPlayer(playerid,loginscreen8);
TextDrawShowForPlayer(playerid,loginscreen9);
TextDrawShowForPlayer(playerid,loginscreen10);
*/
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
Boombox[playerid] = 0;
BoomboxPlayer[playerid] = -1;
BoomboxStream[playerid] = 0;
bpos[playerid][0] = 0; bpos[playerid][1] = 0; bpos[playerid][2] = 0; bpos[playerid][3] = 0;
format(BoomboxURL[playerid], 256, "");
if(IsValidDynamicObject(BoomboxObject[playerid])) DestroyDynamicObject(BoomboxObject[playerid]);
IsOOCMode[playerid] = false;
{
IsOOCMode[playerid] = false;
}
arr_Towing[playerid] = INVALID_VEHICLE_ID;
new string[128];
/* format(string,sizeof(string), "http://translate.******.com/translate_tts?q=%s has connected to the server", RPN(playerid));
foreach(Player, i)
{
if(t[i])
{
PlayAudioStreamForPlayer(i, string);
}
}*/
ResetPlayerWeapons(playerid);
ResetZaiatWeapons(playerid);
// Random Bugs (Machines Example: Sprunk)
/*RemoveBuildingForPlayer(playerid, 1302, 0.0, 0.0, 0.0, 6000.0);
RemoveBuildingForPlayer(playerid, 1209, 0.0, 0.0, 0.0, 6000.0);
RemoveBuildingForPlayer(playerid, 955, 0.0, 0.0, 0.0, 6000.0);
RemoveBuildingForPlayer(playerid, 956, 0.0, 0.0, 0.0, 6000.0);
RemoveBuildingForPlayer(playerid, 1775, 0.0, 0.0, 0.0, 6000.0);
RemoveBuildingForPlayer(playerid, 1776, 0.0, 0.0, 0.0, 6000.0);
RemoveBuildingForPlayer(playerid, 1977, 0.0, 0.0, 0.0, 6000.0);*/
No idea.. Not good at scripting :[
Dude when you connect to the server, how do you login? Do you put your password in a box?