Posts: 221
Threads: 19
Joined: Nov 2009
something like this:
if( (GetDistanceBetweenPlayers(playerid,giveplayerid) <
Posts: 551
Threads: 122
Joined: Nov 2009
Reputation:
0
Not a function, Don't even have to try that to know
Posts: 607
Threads: 41
Joined: Apr 2009
Posts: 551
Threads: 122
Joined: Nov 2009
Reputation:
0
How can i use that to see if there 2 meters from each other?
Posts: 607
Threads: 41
Joined: Apr 2009
Quote:
Originally Posted by ScottCFR
How can i use that to see if there 2 meters from each other?
|
An example :
pawn Код:
if(strcmp(cmd, "/cuff", true) == 0)
{
if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 4) //here you can see this > this means if it's more than 4 that you cant cuff him...
{
format(string, sizeof(string), "%s(%d) Is not close enough you cannot handcuff that player",pname, giveplayerid);
SendClientMessage(playerid, COLOR_ERROR, string);
return 1;
}
if(GetPlayerState(giveplayerid) == PLAYER_STATE_ONFOOT) {
//rest of the code lol
return 1;
}
Posts: 221
Threads: 19
Joined: Nov 2009
Quote:
Originally Posted by ScottCFR
Thanks man
|
Pritty much what I said.
Posts: 551
Threads: 122
Joined: Nov 2009
Reputation:
0
If you would have said "Look for an include" or "Here look at the wiki" but still. Thanks to both of you.