20.01.2012, 18:00
Hi, I have a deathmatch system and I have a strange problem when the player's position is not always getting set, dont know why.
I use it like this:
I used it first with "VDMHydraSpawn(playerid); but I thought that would bug it so I changed it to to timer but still bugging. Heres the code itself
I use it like this:
pawn Код:
SetTimerEx("VDMHydraSpawn", 750, 0, "i", playerid);
pawn Код:
public VDMHydraSpawn(playerid)
{
if(IsInVDM[playerid] == 1)
{
Hydraspawn = random(10);
if (Hydraspawn == 0)
{
SetPlayerPos(playerid,307.7739,1805.6658,18.5583);
SetPlayerFacingAngle(playerid,2);
SetCameraBehindPlayer(playerid);
}
if (Hydraspawn == 1)
{
SetPlayerPos(playerid,309.0186,2054.4512,18.5585);
SetPlayerFacingAngle(playerid, 179);
SetCameraBehindPlayer(playerid);
}
//more random spawns here, probably not necessary to see here
SetPlayerWorldBounds(playerid, 782.4177, -502.1487, 2510.743, 1109.398);
SetTimerEx("VDMSpawnHydra", 750, 0, "i", playerid);
}
}