23.07.2017, 14:41
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.
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..
Код:
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;
}
duel zone..
Код:
SetPlayerPos(playerid, 1413.3236,0.4175,1000.9247);

