Cmd work in 5 secs?
#1

I want to make that when player write /exit, cmd works in ~5 secs, this is possible? Because someone doing /dm, when he get low hp, he /exit and already /dm and he get full HP.

COMMAND:exit( playerid, params[ ] )
{
if(DM[playerid] == true)
{
SetPlayerPos(playerid, 397.5430, -1804.3560, 8.9000);
SendClientMessage(playerid, 0xFF000090, "You exit from DM zone.");
ResetPlayerWeapons(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DM[playerid] = false;
}
Reply
#2

https://sampwiki.blast.hk/wiki/SetTimer
https://sampwiki.blast.hk/wiki/SetTimerEx
Reply
#3

UP, please help.
Reply
#4

http://lmgtfy.com/?q=samp+timer+tutorial
Reply
#5

On Top of your script :

Код:
new ExitTimer[MAX_PLAYERS];
Код:
COMMAND:exit( playerid, params[ ] )
{
if(DM[playerid] == true)
{
SetPlayerPos(playerid, 397.5430, -1804.3560, 8.9000);
SendClientMessage(playerid, 0xFF000090, "You exit from DM zone.");
ResetPlayerWeapons(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
DM[playerid] = false;
SetTimerEx("ExitTimer", 5000, false);
}
I think this will help you
Reply
#6

Italian doesnt work, i get warnings.. I think this script can't work.
Reply
#7

Louris, the issue is you don't understand where you are meant to put the code, so even if I wrote you out the command you probably would still receive errors.

You need to read up on Timer tutorials and it should help you understand.

This should help:
https://sampwiki.blast.hk/wiki/SetTimerEx
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)