How to Make /count at her area only??
#1

Im tryng to make this but i receuve many error
Reply
#2

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

Send me the command. If you made it.
Reply
#4

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!
Reply
#5

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
Reply
#6

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;
    }
Reply
#7

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;
}
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)