SA-MP Forums Archive
How to Make /count at her area only?? - 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: How to Make /count at her area only?? (/showthread.php?tid=480504)



How to Make /count at her area only?? - AnonymouseSAMP - 11.12.2013

Im tryng to make this but i receuve many error


Re: How to Make /count at her area only?? - Tagathron - 11.12.2013

How the heck are we supposed what do you want to make?
None of us can read your minds,use your brain.


Re: How to Make /count at her area only?? - Evocator - 11.12.2013

Send me the command. If you made it.


Re: How to Make /count at her area only?? - Sgt.TheDarkness - 11.12.2013

I think he means, how can he make a /count command that is only displayed in a certain area, with that being said, I reccomend that you start off by using IsPlayerInRangeOfPoint. See the wiki below for the params list and example..

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

Cheers!


Re: How to Make /count at her area only?? - AnonymouseSAMP - 11.12.2013

Quote:
Originally Posted by Sgt.TheDarkness
Посмотреть сообщение
I think he means, how can he make a /count command that is only displayed in a certain area, with that being said, I reccomend that you start off by using IsPlayerInRangeOfPoint. See the wiki below for the params list and example..

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

Cheers!
thnks all


Re: How to Make /count at her area only?? - AnonymouseSAMP - 11.12.2013

is this will work?
pawn Код:
if(strcmp(cmdtext,"/count",true)==0)
    {
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    new name[128];
    GetPlayerName(playerid,name,128);
    if(IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z))
    {
        if (Count == 0)
        {
        SetTimer("Counting",1000,false);
        }else{
        SendClientMessage(playerid, 0xFF0000FF,"Countdown already started!");
        }
    }
    return 1;
    }



Re: How to Make /count at her area only?? - Tayab - 11.12.2013

pawn Код:
if(strcmp(cmdtext,"/count",true)==0)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    new name[128];
    GetPlayerName(playerid,name,128);
    if(IsPlayerInRangeOfPoint(i, 20.0, x, y, z))
    {
        if (Count == 0)
            SetTimer("Counting",1000,false);
        else
            SendClientMessage(playerid, 0xFF0000FF,"Countdown already started!");
    }
    return 1;
}



Re: How to Make /count at her area only?? - AmigaBlizzard - 12.12.2013

This will work everywhere the player is.
Because you're first getting the player's coordinates, after which you're checking if the player is in range of the same coordinates.

So, you're basically checking if the player is in range of himself, which is always the case.