09.01.2012, 00:32
How can i create it and where do i put that pawn code?Is it after Onplayerconnect
CMD:enter(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,1,X,Y,Z)
{
SetPlayerPos(playerid,X,Y,Z);
}
return 1;
}
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;
}
soo if you want to send a mesasge
pawn Код:
|