07.10.2010, 15:20
for the 2 hitman things, we could need some code(s) plz.
for the timer problem in the /ad theres a simple solution w/o any timer.
in the /ad command, do it like:
doing the /invite works the same way (except theres not a time, but an ID). simply set the invited players PVar to the playerid who sent the inv, then check if the /accepting player GOT an invite (his ID could be in the GetPVarInt(playerid,"InvitedByID")... after you set it indeed
for the timer problem in the /ad theres a simple solution w/o any timer.
in the /ad command, do it like:
Код:
if(GetTickCount()-GetPVarInt(playerid,"LastAdTime")<50000) { SendClientMessage(playerid,0xaa5555ff,"Wait 50 seconds before advertising again."); return 1; } else { SetPVarInt(playerid,"LastAdTime",GetTickCount)); //do your ad }