30.10.2012, 12:18
I need a script that makes it so an object can follow the player wherever he goes. Not sure how to put it in code.
new Float:Coo[3]; GetPlayerPos(id,Coo[0],Coo[1],Coo[2]); DestroyObject(object); object = CreateObject(modelid,Coo[0],Coo[1],Coo[2],0.0,0.0,0.0); |
stock SelectRandomPlayer()
{
new random = Random(MAX_PLAYERS);
if(IsPlayerConnected(random))
{
return random;
}
else
{
SelectRandomPlayer();
}
}
new randomplayer = SelectRandomPlayer();
SetPlayerHealth(randomplayer, 100);
(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ)