Need help again
#1

Hello i need next help xD


well i have questino how to do FBI and Cops can do /duty in the same place?

can someone help me?

Cops place where to do /duty is in LSPD lockers

Reply
#2

Sorry for dobule post
Reply
#3

I don't understand what your point is. SAMP has lots of different gamemodes and scripts, so you need to be a little more specific.
Reply
#4

Put this next to your forward's
pawn Код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
Put this anywhere in the script.
pawn Код:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
        return 1;
    }
    return 0;
}
Put this in OnPlayerCommandText.
pawn Код:
if (strcmp("/duty", cmdtext, true, 10) == 0)
{
   if(PlayerToPoint(4.0, playerid, X, Y, Z))
   {
     //your code here.
   }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)