27.06.2013, 11:19
Death Problem!
27.06.2013, 12:06
We ain't no gods or fortune tellers just because we know the structure of a language. You'll have to provide us with some code or contact the server owner (or maybe it's you i don't know), we need to see some code to be able to help you. It's probably a bug however, looks as if it fails to load the right coordinates, since you spawn at 0, 0, 0 a.k.a the farm on the second picture. To fix this, give us or tell the owner to give us, some code.
27.06.2013, 12:10
sorry, i'm owner here is the code
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
DisablePlayerCheckpoint(playerid);
BackupNeeded[playerid] = 0;
new string[128];
new name[MAX_PLAYER_NAME];
new killername[MAX_PLAYER_NAME];
if(UsingSkin[playerid] == 1)
{
SendClientMessage(playerid,COLOR_WHITE, "Transferring you to the Clothes Slection...");
return 1;
}
GetPlayerName(killerid, killername, sizeof(killername));
GetPlayerName(playerid, name, sizeof(name));
GiveNameSpace(name);
GiveNameSpace(killername);
PlayerInfo[playerid][pLocal] = 255;
PlayerInfo[playerid][pInvWeapon] = 0;
PlayerInfo[playerid][pInvAmmo] = 0;
if(PlayerInfo[playerid][pJailed] > 0)
{
Hospitalized[playerid] = 0;
}
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if (PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pMember] != 2)
{
if (GetPlayerWeapon(playerid) != 34 )
{
DropWeapons(GetPlayerWeapon(playerid),GetPlayerAmmo(playerid),X,Y,Z,GetPlayerVirtualWorld(playerid),playerid);
}
}
ResetPlayerWeaponsEx(playerid);
new caller = Mobile[playerid];
if(caller != SCRIPT_PLAYERS)
{
if(caller < SCRIPT_PLAYERS)
{
SendClientMessage(caller, COLOR_GRAD2, " The line just went dead....");
CellTime[caller] = 0;
CellTime[playerid] = 0;
Mobile[caller] = SCRIPT_PLAYERS;
}
Mobile[playerid] = SCRIPT_PLAYERS;
CellTime[playerid] = 0;
}
if(killerid != SCRIPT_PLAYERS)
{
if(IsPlayerConnected(killerid))
{
format(string, sizeof(string), "[KILL]: %s has killed %s with a %s.",killername,name,GunNames[reason]);
ABroadCast(COLOR_RED,string,1);
if(GetPlayerState(killerid) == 2)
{
SendClientMessage(killerid, COLOR_YELLOW, "DriveBy Kill, Dont Abuse it.");
//return 1;
}
}
}
if(PlayerInfo[playerid][pHeadValue] > 0)
{
if(PlayerInfo[killerid][pMember] == 8)
{
format(string, sizeof(string), "[LAPTOP]: Hitman %s has completed the contract on %s for $%d.", killername, name, PlayerInfo[playerid][pHeadValue]);
SendFamilyMessage(8,COLOR_LIGHTBLUE,string);
GivePlayerPCash(killerid,PlayerInfo[playerid][pHeadValue]);
PlayerInfo[playerid][pHeadValue] = 0;
}
}
DeadX[playerid] = X;
DeadY[playerid] = Y;
DeadZ[playerid] = Z;
killerid = INVALID_PLAYER_ID;
SetPlayerColor(playerid,COLOR_GRAD2);
return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
if (gPlayerAccount[playerid] == 0)
{
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]: You have been kicked for not registering.");
Kick(playerid);
}
else if (gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid,COLOR_YELLOW,"[SERVER]: You have been kicked for not logging in.");
Kick(playerid);
}
else
{
if(PlayerInfo[playerid][pAge] == 0)
{
SendClientMessage(playerid, COLOR_RED, "Your age is 0, please use /myage to set your character's age.");
}
if(UsingSkin[playerid] == 0)
{
SetPlayerSkinEx(playerid, PlayerInfo[playerid][pModel]);
}
if(DoneSpecing[playerid] == 1)
{
SetPlayerSkinEx(playerid, PlayerInfo[playerid][pModel]);
new house = PlayerInfo[playerid][pHousekey];
if(house != 255)
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,HouseInfo[house][hInt]);
SetPlayerVirtualWorld(playerid,house+100);
SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
PlayerInfo[playerid][pLocal] = house;
PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
HouseEntered[playerid] = house;
DoneSpecing[playerid] = 0;
}
else
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,1662.6974,-2330.9395,6.5056);
SetPlayerFacingAngle(playerid, 0);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
DoneSpecing[playerid] = 0;
}
}
else if(DoneSpecing[playerid] == 0)
{
if(UsingSkin[playerid] == 1)
{
if(CanPlayerUseSkin(GetPlayerSkin(playerid),playerid))
{
PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);
}
else
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Your spawn skin has been changed due to its restricted for you.");
if(PlayerInfo[playerid][pSex] == 1)
{
PlayerInfo[playerid][pModel] = 26;
SetPlayerSkinEx(playerid, PlayerInfo[playerid][pModel]);
}
else
{
PlayerInfo[playerid][pModel] = 93;
SetPlayerSkinEx(playerid, PlayerInfo[playerid][pModel]);
}
}
Hospitalized[playerid] = 0;
PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
UsingSkin[playerid] = 0;
SetPlayerPos(playerid,PlayerInfo[playerid][Clothesx],PlayerInfo[playerid][Clothesy],PlayerInfo[playerid][Clothesz]);
SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][Clothesw]);
SetPlayerInterior(playerid,PlayerInfo[playerid][Clothesi]);
IntEntered[playerid] = PlayerInfo[playerid][Clothesent];
return 1;
}
}
}
return 1;
}
27.06.2013, 12:31
Try setting their pos after they respawn? I had the same problem a few days ago. Simply fixed it with that. Use a variable. If the variable equals 1, set them there, else, do something else.
27.06.2013, 12:48
i'm confused,can you give me the variables that you fixed your problem ??
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)