World Boundries
#1

This is what happens when I die, I'm not spawning correctly and not using the correct skin.

Reply
#2

When you die? Show your OnPlayerDeath/OnPlayerSpawn parts which have to do with setting a players coords. Make sure you didn't forget a "." for example: 987990 -> 987.990
Reply
#3

Still broke. [EDIT]
Reply
#4

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	SetPVarInt(playerid, "timeofdeath", gettime()); // Store time of death

	if(IsPlayerConnected(killerid))
	{
	    if(killerid != playerid)
	    {
	     	if(AdminDuty[playerid])
		    {
		        if(!AdminDuty[killerid])
		        {
					GivePlayerCash(playerid,-1);
				}
		    }
	    	SetPlayerWantedLevelEx(killerid,GetPlayerWantedLevelEx(playerid)+0);
	    }
	}
	return 1;
}
Код:
public OnPlayerSpawn(playerid)
{
	if(gPlayerLogged[playerid])
	{
		SetPlayerSpawn(playerid);
		SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
	}
	if(gettime()-GetPVarInt(playerid, "timeofdeath") < 10) // If the player died less than 10 seconds ago
	{
	    SetPlayerFacingAngle(playerid, 0);
	    SetPlayerDrunkLevel(playerid, 3000); // Subtle swaying camera for 'dizzy' effect
	    SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]); // uses skin
	    SendClientMessage(playerid,COLOR_FADE3, "----------------------------------------------------------");
	    SendClientMessage(playerid,COLOR_GREEN, "You were criticly injured and rushed to APMC.");
        SendClientMessage(playerid,COLOR_FADE3, "----------------------------------------------------------");
        SetPlayerPos(playerid, 2358.6711, -94.1742, 27.4059); // Spawn at hospital
	}
	return 1;
}
Reply
#5

I forgot to mention that when I die I spawn at the civilian spawn point I set but with CJ skin and when I relog I spawn there instead of faction.
Reply
#6

Maybe because I never but "else" on the check to see if the player is spawning or dying...
Reply
#7

hmmm when I die it sends me to my spawn
Код:
public OnPlayerSpawn(playerid)
{
	if(gPlayerLogged[playerid])
	{
		SetPlayerSpawn(playerid);
		SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
	}
	else if(gettime()-GetPVarInt(playerid, "timeofdeath") < 10) // If the player died less than 10 seconds ago
	{
	    SetPlayerFacingAngle(playerid, 0);
	    SetPlayerDrunkLevel(playerid, 3000); // Subtle swaying camera for 'dizzy' effect
	    SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]); // uses skin
	    SendClientMessage(playerid,COLOR_FADE3, "----------------------------------------------------------");
	    SendClientMessage(playerid,COLOR_GREEN, "You were criticly injured and rushed to APMC.");
        SendClientMessage(playerid,COLOR_FADE3, "----------------------------------------------------------");
        SetPlayerPos(playerid, 2358.6711, -94.1742, 27.4059); // Spawn at hospital
	}
	return 1;
}
Reply
#8

I have fixed this for him over Teamviewer - he had no classes (AddPlayerClass never used).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)