09.08.2014, 08:11
hey guys, i'm trying to add a timer in this dialog.
what i am trying to do is make the dialog option play an audiostream when it is selected and also send a message to the server saying: "player is Dying"
and then i want the player to die 2 seconds after the stream starts playing and also display another message to the server saying "player has Passed On"
how would i go about doing this?
Код:
case 4: { PlayAudioStreamForPlayer(playerid, "http://*******/DeathSound.mp3"); new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME]; new Float:X; new Float:Y; new Float:Z; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "%s(%d) is Dying.", pname, playerid); SendClientMessageToAll(0xAAAAAAAA, string); GetPlayerPos(playerid, X, Y, Z); SetPlayerHealth(playerid, 0); format(string, sizeof(string), "%s(%d) has Passed on.", pname, playerid); SendClientMessageToAll(0xAAAAAAAA, string); }
and then i want the player to die 2 seconds after the stream starts playing and also display another message to the server saying "player has Passed On"
how would i go about doing this?