SA-MP Forums Archive
[HELP] drug dealer fields - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] drug dealer fields (/showthread.php?tid=522483)



[HELP] drug dealer fields - Luca12 - 27.06.2014

Hello I was made for my job 6 fields and how can I in command /drugput make if I near in point of that 6 fields then it says you put the drug on field 1 etc I have all of that I just need this if I near of that some 6 fields.


Re : [HELP] drug dealer fields - Clad - 27.06.2014

Click.
Use this.


Re: [HELP] drug dealer fields - Luca12 - 27.06.2014

I was make this and the problem iss I was near bank and I enter /drugput and it says you are put drug on field 1 but the problem is I was away from field and this not supose to happen.

pawn Код:
if(!IsPlayerInRangeOfPoint(playerid,1.0,880.7999,-33.7000,60.7000)) this is x y z cordinates of first field  and when I type /drugput when I won't near field then nothing happen but if I near field 1 then it send me a message etc..
    {
        you are put drug into field 1
    }



Re : [HELP] drug dealer fields - Clad - 27.06.2014

In place of Message do your code, It simply work like this, If a player is in this point, He can do this, If he is not, He can't.


Re: [HELP] drug dealer fields - Luca12 - 27.06.2014

this doesn't work I type /drugput everywhere and it send me a message I want just send a message when player only type command near that field. Do I use ! or without it


Re : [HELP] drug dealer fields - Clad - 27.06.2014

pawn Код:
if(IsPlayerInRangeOfPoint



Re: [HELP] drug dealer fields - Luca12 - 27.06.2014

Know I type /drugput when I was near bank or somewhere far away from field 1 and nothing happens which is fine know is the problem I stand near field 1 and type drugput and nothing happens


Re: [HELP] drug dealer fields - sammp - 27.06.2014

pawn Код:
CMD:drugput(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, #range, #x, #y, #z))
    {
        SendClientMessage(playerid, -1, "You have put a drug into drug field 1.");
    }
    if(IsPlayerInRangeOfPoint(playerid, #range, #x, #y, #z))
    {
        SendClientMessage(playerid, -1, "You have put a drug into drug field 2.");
    }
    if(IsPlayerInRangeOfPoint(playerid, #range, #x, #y, #z))
    {
        SendClientMessage(playerid, -1, "You have put a drug into drug field 3.");
    }
    if(IsPlayerInRangeOfPoint(playerid, #range, #x, #y, #z))
    {
        SendClientMessage(playerid, -1, "You have put a drug into drug field 4.");
    }
    if(IsPlayerInRangeOfPoint(playerid, #range, #x, #y, #z))
    {
        SendClientMessage(playerid, -1, "You have put a drug into drug field 5.");
    }
    if(IsPlayerInRangeOfPoint(playerid, #range, #x, #y, #z))
    {
        SendClientMessage(playerid, -1, "You have put a drug into drug field 6.");
    }
    return 1;
}