SA-MP Forums Archive
DuelZone Spawn - 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: DuelZone Spawn (/showthread.php?tid=637899)



DuelZone Spawn - Uvais - 23.07.2017

So, i am working on a duelzone system for my server and i made 2 commands to let a player spawn in the duelzone instead of exitting the duelzone automatically on death.

Код:
CMD:spawnindz(playerid,params[])
{
    if(induelzone[playerid] == 0) return SendClientMessage(playerid, COLOR_SILVER, "You are not in a duelzone!");
    if(spawninduelzone[playerid] == 1) return SendClientMessage(playerid, COLOR_SILVER, "You have already set your spawn in duelzone!");
	spawninduelzone[playerid] = 1;
	SendClientMessage(playerid, COLOR_WHITE, "You will now spawn at the duelzone zone. Use /dcancelspawn to spawn at your own base next time.");
	return 1;
}

CMD:dzcancelspawn(playerid,params[])
{
    if(induelzone[playerid] == 0) return SendClientMessage(playerid, COLOR_SILVER, "You are not in a duelzone!");
	if(spawninduelzone[playerid] == 0) return SendClientMessage(playerid, COLOR_SILVER, "You didn't set your spawn in duelzone!");
	spawninduelzone[playerid] = 0;
	SendClientMessage(playerid, COLOR_WHITE, "You will no longer spawn at the duel zone.");
	return 1;
}
Instead, the player spawns somewhere random in the battle ground (The Desert). I haven't defined spawninduelzone. Can someone help me in creating a define for it? These are the co-ordinates to the
duel zone..

Код:
SetPlayerPos(playerid, 1413.3236,0.4175,1000.9247);



Re: DuelZone Spawn - Uvais - 24.07.2017

I need some help on this..


Re: DuelZone Spawn - Paulice - 24.07.2017

PHP код:
public OnPlayerSpawn(playerid)
{
    if(
spawninduelzone[playerid])
    {
        
SetPlayerPos(playerid1413.32360.41751000.9247);
        return 
1;
    }
    return 
1;