Little help:
Since i cant find much resources on this, i decided to do it on my own. Forgive me if ive done something stupid or "forbidden" or whatever.
Ive combined a hello world, with a hp thing that two different people showed me. Code:
What i want to know, is how to do this: client_print(id,print_chat THETIME like, get the time of the server, and also, how to do rather than one client, send to all clients...thanks guys :D |
Re: Little help:
Try this..
Code:
Edit: Woops, forgot set set the index to 0.. |
This function will grab the current servers time.. So if the server is in UK and you play from US (or vice versa) then it will not be correct time for you...
from amxmodx.inc: Code:
Example: Code:
|
Okay thanks for the replies, but v3x once again, can you comment your stuff a little? I understand how it works, but somethings i dont get like
Code:
Code:
? At least thats how it would work in vb. Also, cmd_access(id,level,cid,1)) { --whats that all? They have to have access to the command? Thanks, i hope you dont mind me picking apart your work! |
:P v3x.. I musta been posting at same time as you!!
9 is the size of the string (meaning it can hold 9 characters), but strings in C must end with a null terminater (you never need have to add it manually in Small C), meaning the MAX amount of characters you can Use is 9 - 1, so 8 characters + 1 null-terminater is the max amount of characters the string can really hold... So when you call the get_time function you pass it the string you want it to write too (CurTime) and you also tell it how many characters the function is allowed to write.. And the %s is a place-holder for extra values.. Think of like this: the %s will be replaced by a string, what string? the CurTime string that we just made using the get_time function.. how? because the %s is the First place-holder in the string and the CurTime variable is the First extra parameter passed to the function.. |
Quote:
I'll leave it to xeroblood to answer your questions. :) |
cool!thanks for the great response!
|
Okay, started working on this today, heres what i got:
Code:
|
Do you want it to erase it completely, or set it to 0?
Also, use comments: Code:
|
Try this: (C, C++ and Small C are all very different in syntax than VB)
Code:
|
| All times are GMT -4. The time now is 14:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.