When you die inside of an event you get sent to the hospital? -
Mr. Despair - 18.08.2010
In an event if you die in it, you get a message saying "wasted" and you get sent to the hospital. I want it so when you die, you get sent back to your original coordinates?
Re: When you die inside of an event you get sent to the hospital? -
RealWorldGTA - 18.08.2010
original being default spawn point when one connects to server? or point where one dies ?
Re: When you die inside of an event you get sent to the hospital? -
Mr. Despair - 18.08.2010
Like the spot you're in when you /joinevent, when you die, you go back to the point before you joined the event
Re: When you die inside of an event you get sent to the hospital? -
RealWorldGTA - 18.08.2010
public OnPlayerDeath(playerid, killerid, reason)
{
if(playerisinevent[playerid]) // or whatever variable that defines the player is in an event
{
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid,A);
SetSpawnInfo(playerid, playerid, PlayerInfo[playerid][pModel],X, Y, Z, A, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
else
{
// else they arent in an event, and you want to send em to hell or something!
}
return 1;
}
Re: When you die inside of an event you get sent to the hospital? -
Mr. Despair - 18.08.2010
That doesn't work.
Re: When you die inside of an event you get sent to the hospital? -
RealWorldGTA - 18.08.2010
post what you got .. else we are just gonna play guessing games
Re: When you die inside of an event you get sent to the hospital? -
Mr. Despair - 18.08.2010
Код:
if(IsAtEvent[playerid]) // or whatever variable that defines the player is in an event
{
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid,A);
SetSpawnInfo(playerid, playerid, PlayerInfo[playerid][pModel],X, Y, Z, A, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
return 1;
}
This is what I have but when I die in an event, I still get sent to the hospital.
Re: When you die inside of an event you get sent to the hospital? -
ikey07 - 18.08.2010
on top
pawn Код:
new Float:EventX[MAX_PLAYERS],Float:EventY[MAX_PLAYERS],Float:EventZ[MAX_PLAYERS];
new EventInt[MAX_PLAYERS];
new EventVW[MAX_PLAYERS];
new NeedEventSpawn[MAX_PLAYERS];
OnPlayerdDeath
GetPlayerPos(playerid,EventX[playerid],EventY[playerid],EventZ[playerid]);
EventInt[playerid] = GetPlayerInterior(playerid);
EventVW[playerid] = GetPlayerVirtualWorld(playerid);
NeedEventSpawn[playerid] = 1;
OnPlayerSpawn
if(NeedEventSpawn[playerid] == 1) //Place this in the top of OnPlayerspawn, but after all others things, in place where you starts to set pos on spawns, etc.
{
NeedEventSpawn[playerid] = 0;
SetPlayerInterior(playerid,EventInt[playerid]);
SetPlayerPos(playerid,,EventX[playerid],EventY[playerid],EventZ[playerid]);
SetPlayerVirtualWorld(playerid,EventVW[playerid]);
return 1;
}
Re: When you die inside of an event you get sent to the hospital? -
Mr. Despair - 18.08.2010
Код:
: error 021: symbol already defined: "EventX"
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 033: array must be indexed (variable "EventX")
: error 035: argument type mismatch (argument 2)
: error 035: argument type mismatch (argument 2)
: error 033: array must be indexed (variable "EventX")
: error 033: array must be indexed (variable "EventX")
: error 033: array must be indexed (variable "EventY")
: error 033: array must be indexed (variable "EventZ")
: error 033: array must be indexed (variable "EventInt")
: error 035: argument type mismatch (argument 2)
: error 033: array must be indexed (variable "EventInt")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
13 Errors.
I did what you said.
Re: When you die inside of an event you get sent to the hospital? -
Mr. Despair - 18.08.2010
Bump.....