13.02.2013, 18:46
Hi! I tried to do a command with timer, who must be executed every 2-3 minutes. But, my script isn't good.
Help me. ( Sorry for my English) PS: I know 5000 = 5 sec, i will set it later )
Код:
#include <a_samp> #include <core> new LSp; forward Timerf(); forward Timer(); public OnGameModeInit() { LSp = CreateObject(5167, -2450.27, 1851.55, 0.15, 0.00, 0.00, 180.00); SetTimer("Timerf", 5000, true); SetTimer("Timer", 5000, true); } public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/ff")) { MoveObject(LSp, -2400.27, 1851.55, 0.15, 5.0); SetTimer("Timerf2", 5000, true); return 1; } if(!strcmp(cmdtext, "/ff2")) { MoveObject(LSp, -2450.27, 1851.55, 0.15, 5.0); SetTimer("Timer2", 5000, true); return 1; } return 0; }