Or Commands ? :S
#1

Hey,

I want to make a CMD:rob etc, So if i wanted to do a CMD:robshop(playerid,params)

I would need to use GetPlayerDistanceFromPoint, How can i make multiple versions of that? i was thinking
pawn Код:
CMD:robshop(playerid,params)
{
       if(GetPlayerDistanceFromPoint(playerid,X,Y,Z)) return SendError(playerid,"You are not in the shop");
       else if(GetPlayerDistanceFromPoint(playerid,X,Y,Z)) return SendError(playerid,"You are not in the shop");
       else if(GetPlayerDistanceFromPoint(playerid,X,Y,Z)) return SendError(playerid,"You are not in the shop");
       else
       {
       Rob Stuff Here
       }
       return 1;
}
But i really don't know well thanks in advance
Reply
#2

Why not use the IsPlayerInRangeOfPoint function? That's what it's been created for:

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

And you can make:
pawn Код:
if(!IsPlayerInRangeOfPoint(playerid, 10.0, X, Y, Z) || !IsPlayerInRangeOfPoint(playerid, 10.0, xX, yY, zZ))
       return SendClientMessage(playerid, -1, "You're not in a rob zone.");

// here continue code, if the player is in range of point
Reply
#3

Yeah Use IsPlayerInRangeOfPoint
pawn Код:
CMD:robshop(playerid,params)
Aren't u missing [] after params?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)