[Help]/enter and /exit command
#1

How can i create it and where do i put that pawn code?Is it after Onplayerconnect
Reply
#2

pawn Код:
CMD:enter(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid,1,X,Y,Z)
    {
        SetPlayerPos(playerid,X,Y,Z);
    }
    return 1;
}
Reply
#3

I want it start like this If "/enter" [playerid]
Reply
#4

soo if you want to send a mesasge
pawn Код:
CMD:enter(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid,1,X,Y,Z)
    {
        for(new i=0; i<MAX_PLAYERS; i++)
        {
                GetPlayerPos(playerid,X,Y,Z);
                GetPlayerName(playerid,Nam);
                if(IsPlayerInRangeOfPoint(i, 5.0, X,Y,Z))
                {
                    format(str,sizeof(str),"%s has entered the building",Nam);
                    SendClientMessageToAll(i,-1,str);
                    SetPlayerPos(playerid,X,Y,Z);
                }
         }
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by Tanush123
Посмотреть сообщение
soo if you want to send a mesasge
pawn Код:
CMD:enter(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid,1,X,Y,Z)
    {
        for(new i=0; i<MAX_PLAYERS; i++)
        {
                GetPlayerPos(playerid,X,Y,Z);
                GetPlayerName(playerid,Nam);
                if(IsPlayerInRangeOfPoint(i, 5.0, X,Y,Z))
                {
                    format(str,sizeof(str),"%s has entered the building",Nam);
                    SendClientMessageToAll(i,-1,str);
                    SetPlayerPos(playerid,X,Y,Z);
                }
         }
    }
    return 1;
}
That for entering. and why not with exiting ?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)