need some help with deathmatch over here. - 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: need some help with deathmatch over here. (
/showthread.php?tid=582534)
need some help with deathmatch over here. -
MindLees - 21.07.2015
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 ?
Re: need some help with deathmatch over here. -
xPirate - 21.07.2015
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.
Re: need some help with deathmatch over here. -
Glenn332 - 21.07.2015
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(playerid, SOMETHING,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(playerid, SOMETHING,SOMETHING,SOMETHING);
//other lines you only want to happen at first spawn.
SetPVarInt(playerid,"Spawned", 1);
return 1;
}
SetPlayerPos(playerid, SOMETHING,SOMETHING,SOMETHING);
//other lines you want to happen if he already spawned in once.
return 1;
}
Re: need some help with deathmatch over here. -
Crystallize - 21.07.2015
https://sampforum.blast.hk/showthread.php?tid=416916 here mate enjoy this might help you a lot