[Help] No player respawn.
#1

I made a team dm server but i want them to not respawn till one team wins and the game mode restarts.
How can i make it so they don't respawn and spectates another player till gamemode ends and make a text draw to show the players still alive? sorry i am not that good at scripting :O
Reply
#2

:O anyone can help me
Reply
#3

idk about the spectate, but you can make a variable

Top of script
Код:
new dead[MAX_PLAYERS];
On player death
Код:
dead[playerid] =1;
And onplayerspawn
Код:
if(dead[playerid] =1) return SendClientMessage(playerid,COLOR,"You are dead!");

Reply
#4

i get these errors:
error 017: undefined symbol "dead"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Reply
#5

On what lines?
Reply
#6

Nevermind the script doesn't work. After i die i just respawn and one correction for you:
Top of script
Code:

new dead[MAX_PLAYERS];


On player Spawn<<<<<<
Code:

dead[playerid] =1;


And Death<<< or it will say when u spawn
Code:

if(dead[playerid] =1) return SendClientMessage(playerid,COLOR,"You are dead!");

switch the spawn with death.



anyone have a better one ? :O


Reply
#7

Ok so i got the top working but how do i set objective so when one team has no more players or time runs out the game mode will restart.
Reply
#8

Quote:
Originally Posted by bennyisme
Ok so i got the top working but how do i set objective so when one team has no more players or time runs out the game mode will restart.
Whenever your condition is met, have it run

Код:
SendRconCommand("gmx");
Reply
#9

Quote:
Originally Posted by Valak
Quote:
Originally Posted by bennyisme
Ok so i got the top working but how do i set objective so when one team has no more players or time runs out the game mode will restart.
Whenever your condition is met, have it run

Код:
SendRconCommand("gmx");
i already did that but i am not sure how to script it to end the game mode.( besides the timer) since it has no respawns.
Reply
#10

just have it so that whenever there is an OnPlayerDeath have it add 1 to a variable that will track all deaths. Whenever that number reaches <x> have it run that SendRconCommand. you can tweak the tracker a bit as needed to check for duplicate deaths, teams, etc. Just need to expand on a base concept, that's the key to coding anything. Start small, then build around.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)