04.05.2014, 06:32
Hey All.
this is the DM script i am using:
if player joins the dm and gets killed then he is spawning in spawn location.
but i want to know is there any way to spawn in the location where player accessed the command instead of server spawn location.
please help me.
thanks in advance
this is the DM script i am using:
pawn Код:
CMD:mgdm(playerid, params[])
{
if (InAFK[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You are Now in AFK/BRB Mode! Try /back to use this cmd!");
return 1;
}
else
{
InDM[playerid] = 1;
DmID[playerid] = 1;
InLobby[playerid] = 0;
SendClientMessage(playerid, -1, "{FFFF00}Welcome to Minigun DM !");
SetPlayerInterior(playerid, 14);
new rand = random(sizeof(RandomSpawnMGDM));
SetPlayerPos(playerid, RandomSpawnMGDM[rand][0], RandomSpawnMGDM[rand][1], RandomSpawnMGDM[rand][2]);
SetPlayerVirtualWorld(playerid, 32);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 38, 100000);
new str[56+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "{9933FF}***%s (ID: %d) has joined Minigun DM. (/mgdm)!", name, playerid);
SendClientMessageToAll(-1, str);
}
return 1;
}
but i want to know is there any way to spawn in the location where player accessed the command instead of server spawn location.
please help me.
thanks in advance