Timer Delay without using Callbacks
#3

hmm Thanks for the answer.. i guess I wouldn't mind using the timer if it wern't for the fact that I want to teleport a player elsewhere then have the rest of the code only affect the player teleported.. but can't get it to recognise that the player I just teleported is still the same player that needs to have the rest of the actions applied to it so :

Код:
public OperateDelay (playerid)
{	
	ApplyAnimation(playerid,"SUNBATHE ","Lay_Bac_out",4.0,1,1,1,1,1);
	SetPlayerHealth(playerid,100);
	SendClientMessage(playerid, 0xF1CB45FF, "You're all Patched Up!!"); 
        return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/operate", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid, 0xF1CB45FF, "Beginning Operation");
	SetPlayerPos(playerid, 268.5968,1857.6873,9.8133); // Operating Table
	ApplyAnimation(playerid,"SUNBATHE ","Lay_Bac_in",4.0,1,1,1,1,1);
	SetTimer("OperateDelay", 10000, true);
        return 1;
	}
return 0;
}
using that code it's not making my player stand back up after the 10 second timer delay and I know its probably something simple I'm missing or maybe not but I can't make it realise that the playerid is meant to be the same player that typed in that command
Reply


Messages In This Thread
Timer Delay without using Callbacks - by Maniac_X - 31.10.2010, 03:15
Re: Timer Delay without using Callbacks - by bigcomfycouch - 31.10.2010, 04:21
Re: Timer Delay without using Callbacks - by Maniac_X - 31.10.2010, 04:53
Re: Timer Delay without using Callbacks - by bigcomfycouch - 31.10.2010, 05:02
Re: Timer Delay without using Callbacks - by Maniac_X - 31.10.2010, 05:11

Forum Jump:


Users browsing this thread: 1 Guest(s)