public SetPlayerSpawn(playerid)
{
new string[128];
if(IsPlayerConnected(playerid))
{
if(!IsPlayerNPC(playerid))
{
if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0)
{
if(PlayerInfo[playerid][pAdminDuty] == 1) return 1;
if(FirstSpawn[playerid] != 1)
{
SetRealMoney(playerid, ScriptMoney[playerid]);
PlayerInfo[playerid][pDeaths] += 1;
SetPlayerHealth(playerid, 50.0);
SafeSetPlayerInterior(playerid, 3);
SafeSetPlayerPos(playerid, 348.8042,162.5563,1014.6947); // Warp the player
SetPlayerFacingAngle(playerid, 0);
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~You need to rest now ...", 5000, 3);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
if(PlayerInfo[playerid][pVIP] == 1)
{
SetTimerEx("ReleaseFromHospital", 20000, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pVIP] == 2)
{
SetTimerEx("ReleaseFromHospital", 17500, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pVIP] == 3)
{
SetTimerEx("ReleaseFromHospital", 15000, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pAdmin] >= 1)
{
SetTimerEx("ReleaseFromHospital", 12500, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pAdmin] >= 4)
{
SetTimerEx("ReleaseFromHospital", 10000, 0, "i", playerid);
}
else
{
SetTimerEx("ReleaseFromHospital", 25000, 0, "i", playerid);
}
PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
return 1;
}
}
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[killerid][pKills] += 1;
PlayerInfo[playerid][pDeaths] += 1;
MedicBill[playerid] = 1;
new string[128];
new name[MAX_PLAYER_NAME];
new name2[MAX_PLAYER_NAME];
new deathreason[20];
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(killerid, name2, sizeof(name2));
new playercash;
new victimteam = gTeam[playerid];
new Float:px,Float:py,Float:pz;
new killerteam = gTeam[killerid];
ScriptMoneyUpdated[playerid] = 1;
TextDrawHideForPlayer(playerid, Textdraw39[playerid]);
TextDrawHideForPlayer(playerid, Textdraw40[playerid]);
gPlayerSpawned[playerid] = 0;
SetPlayerPos(playerid,X,Y,Z);
pawn Код:
|
Newbie й foda, nгo acredito que eu nгo tinha pensado nisso.
Vou sу esperar meu irmгo pra testar. Valeu ai pela ajuda. Tomara que de certo. ___________________________________________ Edit Deu certo nгo, continua na mesma. |