22.06.2011, 11:20
Let's assume that player want to enter PD station in LS. So he's stands in front of PD doors and writes a command like /enter. Now, that code I gave you is just an simple example of that enter command.
This will check did the player wrote /enter command.
If the command has been called it will check if player is in front of PD.
You should replace Float:R(ange), Float:X, Float:Y and Float:Z with your range and coordinates.
And then if the player is in front of a PD it will set his position wherever you want.
Replace Float:SomeX, Float:SomeY, FloatomeZ with your coordinates where you want to put player.
pawn Код:
if (strcmp("/enter", cmdtext, true) == 0)
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, Float:R, Float:X, Float:Y, Float:Z))
You should replace Float:R(ange), Float:X, Float:Y and Float:Z with your range and coordinates.
pawn Код:
SetPlayerPos(playerid, Float:SomeX, Float:SomeY, Float:someZ);
Replace Float:SomeX, Float:SomeY, FloatomeZ with your coordinates where you want to put player.