How to Spawn IN Gamemode after died in Gamemode ?
#1

Hi peoples ^^
I createt a simple GunGame In My Gang-Gamemode
But when I died In the Gungame, I spawn at my normal Spawnpoint =(
How do I have to script to Spawn in that Gungame If Died in the Gungame
and If I didn't die I that Gungame I spawn at my normal Spawnpoint..

Hope I doesn't explained It to stupid xD

MFG Bearfist
Reply
#2

Just do something like this: Create a new global variable, like

pawn Code:
new IsInGunGame[MAX_PLAYERS];
When you join the GunGame, you set it to 1 for the respective player,

pawn Code:
IsInGunGame[playerid]=1;
Then you add in OnPlayerSpawn something like

pawn Code:
if(IsInGunGame[playerid]==1)
{
  SetPlayerPos(playerid,x,y,z);
}
Of course you need to set the variable to 0 also at the point you want the player to spawn normally again after the GunGame finished and you have to add it in OnPlayerDisconnect also and set it to 0 for the playerid.

Hope you understand me and I could help you a bit :P
Reply
#3

Yeeeh

..I got Thanks very much buddy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)