Setting playerpos
#1

Hey All.

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;
}
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
Reply


Messages In This Thread
Setting playerpos - by saikumar - 04.05.2014, 06:32
Re: Setting playerpos - by Avi Raj - 04.05.2014, 06:33
Re: Setting playerpos - by PinEvil - 04.05.2014, 06:36
Re: Setting playerpos - by saikumar - 04.05.2014, 06:45
Re: Setting playerpos - by saikumar - 04.05.2014, 09:58

Forum Jump:


Users browsing this thread: 1 Guest(s)