Player Death Spawn - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Player Death Spawn (
/showthread.php?tid=507259)
Player Death Spawn -
Pepino960 - 16.04.2014
Hello again.
Ye ive got a 2. Problem....
I have got a script that saves and loads my positions when i join/Exit the Server.
And evertime ive died, it spawns me to the last Position (where ive left the Server).
Now ive edited it a Little bit but "IsPlayerDead" seems to have no function.. any help would be nice
PHP код:
new IsPlayerDeath[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
if(!dini_Exists(FileStats(playerid)))
{
SetPlayerPos(playerid,1081.1833,-1697.3507,13.5469);
return 1;
}
if(IsPlayerDeath[playerid] == 1)
{
GivePlayerMoney(playerid, -45);
SetPlayerPos(playerid,1172.7595,-1323.5958,15.4011);
return 1;
}
else
SetPlayerPos(playerid,positionx,positiony,positionz);
return 1;
}
Re: Player Death Spawn -
J4mmyHD - 16.04.2014
Show your OnPlayerDeath please.
AW: Player Death Spawn -
Pepino960 - 16.04.2014
Theres nothing
AW: Player Death Spawn -
Pepino960 - 16.04.2014
+ when ive died, it spawns me to the coordinations 0 0 0
Re: AW: Player Death Spawn -
Bingo - 16.04.2014
Quote:
Originally Posted by Pepino960
+ when ive died, it spawns me to the coordinations 0 0 0
|
Then just create a callback,
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerPos(playerid, 1178.1852,-1323.3883,14.1076);
GivePlayerMoney(playerid, -20);
return 1;
}
Re: Player Death Spawn -
Pepino960 - 16.04.2014
That wouldnt work because of the
PHP код:
SetPlayerPos(playerid,positionx,positiony,positionz);
Re: Player Death Spawn -
Bingo - 16.04.2014
Quote:
Originally Posted by Pepino960
That wouldnt work because of the
PHP код:
SetPlayerPos(playerid,positionx,positiony,positionz);
|
You stated above that after death you are spawned at 0,0,0?
Re: Player Death Spawn -
Pepino960 - 16.04.2014
Umm my fault -.-'
Ive got OnPlayerSpawn above OnPlayerDeath :P