/inv command (New scripter)
#1

New to scripting, haven't used timers much atall and there are no errors in my code, but nothing happens when I do /inv ingame.
Code: http://pastebin.com/dLSrsiX8
Reply
#2

Change: SetTimerEx("inv",1000,true,"i");
To: SetTimerEx("inv",1000,true,"i",playerid);

Then give it a try..
Reply
#3

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
Change: SetTimerEx("inv",1000,true,"i");
To: SetTimerEx("inv",1000,true,"i",playerid);

Then give it a try..
Yes, do this.

In essence without the following variable (playerid) it should of crashed the server (from my experience, or my blondeness).

Quote:
Originally Posted by SAMP Forums
This forum requires that you wait 120 seconds between posts. Please try again in 54 seconds.
Really?
Reply
#4

Thanks for the quick reply, its working fine now.
Reply
#5

One more TIP:

Add this to the top of your Script (This is an infinity float.):
pawn Код:
#define INF 0x107FFF
Then Add this to your command:
pawn Код:
SetPlayerHealth(playerid, INF);
This is easier, extremely better & less laggy.

No need for Timers.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)