18.01.2010, 13:50
If someone press F4 and dies he/she shouldn't get to the class menu he should just spawn.
Any one have a idea ?
Any one have a idea ?
SpawnPlayer(playerid);
SpawnPlayer(playerid);
TogglePlayerSpectating(playerid,0);
... loading character information here and set the player position.
public OnPlayerRequestClass(playerid, classid) { new string[128]; PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0); // 1068 1062 PlayerInfo[playerid][pModel] = Peds[classid][0]; if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1) { ClearChatbox(playerid, 10); PlayerInfo[playerid][pMuted] = 1; format(string, sizeof(string), "Welcome SendClientMessage(playerid, COLOR_BLUE1, string); SendClientMessage(playerid, COLOR_YELLOW2, " "); if (gPlayerAccount[playerid] != 0) { SendClientMessage(playerid, COLOR_WHITE, "Hint: Use /login <password> to log in to your game account."); //SendClientMessage(playerid, COLOR_LIGHTRED, "You'll be kicked in 60 seconds if you won't login !"); } else { SendClientMessage(playerid, COLOR_GREEN1, "You need to register to play here"); SendClientMessage(playerid, COLOR_WHITE, "HINT: /register [password]"); } SetPlayerCameraPos(playerid, ); SetPlayerCameraLookAt(playerid, ); SetPlayerPos(playerid, ); //PlayerPlaySound(playerid, ); PlayerInfo[playerid][pModel] = Peds[classid][0]; SetPlayerTeamFromClass(playerid,classid); } else SpawnPlayer(playerid); return false;