DuelZone Spawn
#1

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);
Reply
#2

I need some help on this..
Reply
#3

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

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)