/sethp CMD +REP
#9

Get a coordinate inside Four Dragons and use /save.
Gather the saved coordinates from your My Documents > GTA SA User Files > SAMP > savedpositions.txt

The next thing that you wanna do is copy paste the x, y, z coordinates and copy paste them on IsPlayerInRangeOfPoint and then check if they are in the range, if they are let /sethp execute otherwise if not then print out a client message to the player that they aren't in Four Dragons casino.

So basically it would've looked like this

PHP код:
CMD:sethp(playeridparams[]) 

    new 
Float:betstring[92]; 
    
    if(!
IsPlayerInRangeOfPoint(playeridFloat:rangeFloat:xFloat:yFloat:z))
        return 
SCM(playerid, -1"* You are not inside Four Dragons casino.");
    
    if(
sscanf(params"f"bet)) 
        return 
SCM(playerid, -1"USAGE:/sethp (hp)."); 

    
format(stringsizeof(string), "Your Hp Has Been Setten To %.2f",bet); 
    
SCM(playerid, -1string); 
    
SetPlayerHealth(playerid bet); 
    return 
1

Replace the range with the amount of radius do you want the player near in the coords in order to execute the command and replace the X Y Z with the coordinates that you've gathered
Reply


Messages In This Thread
/sethp CMD +REP - by Osamakurdi - 04.01.2018, 08:47
Re: /sethp CMD +REP - by FailerZ - 04.01.2018, 08:56
Re: /sethp CMD +REP - by Bolex_ - 04.01.2018, 09:03
Re: /sethp CMD +REP - by Osamakurdi - 04.01.2018, 09:05
Re: /sethp CMD +REP - by Osamakurdi - 04.01.2018, 09:07
Re: /sethp CMD +REP - by Osamakurdi - 04.01.2018, 09:13
Re: /sethp CMD +REP - by Dayrion - 04.01.2018, 09:29
Re: /sethp CMD +REP - by Osamakurdi - 04.01.2018, 09:39
Re: /sethp CMD +REP - by JaKe Elite - 04.01.2018, 10:40
Re: /sethp CMD +REP - by Osamakurdi - 04.01.2018, 11:52

Forum Jump:


Users browsing this thread: 1 Guest(s)