Script /water in LSPD
#1

hello everyone, i try to make /water in DP for prisoners.
How? if the character stay 40, 50 minutes without eat, he will die, then will need feeding in jail, but the range this is too high...
i can use /water in locker room, and on the jail

code:
Quote:

if(strcmp(cmdtext, "/water", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,6, 251.2, 85.4, 1002.85))
{
new Float:health;
GetPlayerHealth(playerid,health);
format(string, sizeof(string), "* %s drinks some water.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
health += 25.0;
if(health > 100.0)
{
health = 100.0;
}
SetPlayerHealth(playerid, health);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not near a water source !");
return 1;
}
return 1;
}

Reply
#2

if(IsPlayerInRangeOfPoint(playerid,6, 251.2, 85.4, 1002.85))

the secon parameter, 6, is the radius. Note that this is the RADIUS, and the diameter = radius*2.
Change it to 2 or 4 and it should do the trick.
Reply
#3

Quote:
Originally Posted by [FSaF]Jarno
Посмотреть сообщение
if(IsPlayerInRangeOfPoint(playerid,6, 251.2, 85.4, 1002.85))

the secon parameter, 6, is the radius. Note that this is the RADIUS, and the diameter = radius*2.
Change it to 2 or 4 and it should do the trick.
oooo thanks, i think parameter 6, is interior...

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)