[Help]/enter and /exit command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help]/enter and /exit command (
/showthread.php?tid=309757)
[Help]/enter and /exit command -
Tamao_Serizawa - 09.01.2012
How can i create it and where do i put that pawn code?Is it after Onplayerconnect
Re: [Help]/enter and /exit command -
Tanush123 - 09.01.2012
pawn Код:
CMD:enter(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,1,X,Y,Z)
{
SetPlayerPos(playerid,X,Y,Z);
}
return 1;
}
Re: [Help]/enter and /exit command -
Tamao_Serizawa - 09.01.2012
I want it start like this If "/enter" [playerid]
Re: [Help]/enter and /exit command -
Tanush123 - 09.01.2012
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;
}
Re: [Help]/enter and /exit command -
botak - 25.12.2013
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 ?