Making HP command prob
#1

Hello guys !

I need /hp command to refill your health

And it costs 1600

and if he tries again it says "You can't use this command right, now please wait 3 minutes"

And when he can use it again it says "You can use the command /hp now"

every 3 mins he can do it again

Thanks.
Reply
#2

This isnt the place to ask for scripters. This is the place to help you with script's you've created.
Reply
#3

pawn Код:
new LastUsed[MAX_PLAYERS];//ontop

CMD:hp(playerid,params[])
{
new var=gettime() - LastUsed[playerid];
if(var<=(60*3))return SendClientMessage(playerid,-1,"{ff0000}You can use this once in 3 mins only"):
SetPlayerHealth(playerid, 100):
LastUsed[playerid]=gettime();
return SendClientMessage(playerid,-1,"{00cc00}You have been healed");
}
Reply
#4

well i did an /hp but i can do it whenever i want to that's the prob i need timer
Reply
#5

you dont need a timer
use the way i told
see my post above
Reply
#6

@brozeus

THANKS !

+rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)