need some help with deathmatch over here.
#1

Hi guys i downloaded some dm filterscript for my mode and on player death he get respawned on my server spawn position.

the thing that i need is on player death in dm that he gets respawned in deathmatch again. how can i make that ?
Reply
#2

EDIT:
I'll show you an example with ZCMD. That's really simple
Код:
public OnPlayerSpawn(playerid)
{
      if(Yourvariable == 1) //Your dm variable.. if you don't have one you need to make it.
      { 
	   cmd_YOURDMCommand(playerid, "");
      }
}
Basically what that will do, it will execute your deathmatch command, which means spawn the player where he needs to be spawned, give all the weapons.. Pretty much everything you have in your command like /pistoldm.
or /mdm if you know what i mean.
Reply
#3

Im presuming this so dont get mad if I got this wrong :P

You got a SetPlayerPos under OnPlayerSpawn?

Add this
PHP код:
public OnPlayerSpawn(playerid) {
if(
GetPVarInt(playerid"Spawned") == 0) {
SetPlayerPos(playeridSOMETHING,SOMETHING,SOMETHING);
//other lines you only want to happen at first spawn.
SetPVarInt(playerid,"Spawned"1);
}
return 
1;

Or use this for stuff you want to happen when he has spawned in first time already:

PHP код:
public OnPlayerSpawn(playerid) {
if(
GetPVarInt(playerid"Spawned") == 0) {
SetPlayerPos(playeridSOMETHING,SOMETHING,SOMETHING);
//other lines you only want to happen at first spawn.
SetPVarInt(playerid,"Spawned"1);
return 
1;
}
SetPlayerPos(playeridSOMETHING,SOMETHING,SOMETHING);
//other lines you want to happen if he already spawned in once.
return 1;

Reply
#4

https://sampforum.blast.hk/showthread.php?tid=416916 here mate enjoy this might help you a lot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)