05.08.2011, 20:50
I saw that datagram.inc is present with sa-mp server package. I tried to use it, and it didn't work, I searched on SA-MP Wiki, but there isn't any datagram function.
How can I use it?? It can be useful to (ad example) communicate with other servers.
This is the INCLUDE File:
Another thing: I noticed that Compuphase's original TIME.INC was modified, the original file is:
But SA-MP's one has only 3 functions: gettime, getdate and tickcount. Why didn't they implement the other functions in sa-mp too? The time stamp can be useful.
How can I use it?? It can be useful to (ad example) communicate with other servers.
This is the INCLUDE File:
pawn Код:
/* Datagram sending/receiving
*
* © Copyright 2005, ITB CompuPhase
* This file is provided as is (no warranties).
*/
#if defined _datagram_included
#endinput
#endif
#define _datagram_included
#pragma library DGram
native sendstring(const message[], const destination[]="");
native sendpacket(const packet[], size, const destination[]="");
native listenport(port);
forward @receivestring(const message[], const source[]);
forward @receivepacket(const packet[], size, const source[]);
pawn Код:
/* Date/time functions
*
* © Copyright 2001-2005, ITB CompuPhase
* This file is provided as is (no warranties).
*/
#if defined _time_included
#endinput
#endif
#define _time_included
#pragma library Time
native gettime(&hour=0, &minute=0, &second=0);
native settime(hour=cellmin, minute=cellmin, second=cellmin);
native getdate(&year=0, &month=0, &day=0);
native setdate(year=cellmin, month=cellmin, day=cellmin);
native settimestamp(seconds1970);
native settimer(milliseconds, bool: singleshot=false);
native tickcount(&granularity=0);
native delay(milliseconds);
forward @timer();