26.04.2011, 14:48
Well ,/enter still not work.
This is my code:
This is my code:
Код:
#include <a_samp> new driving; public OnGameModeInit() { DisableInteriorEnterExits(); driving = CreatePickup(1239,1,2045.5084228516,-1908.2283935547,12.99134349823); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/enter",cmdtext,true,6) == 0) { if(IsPlayerInRangeOfPoint(playerid,10,2045.5084228516,-1908.2283935547,12.99134349823)) { SetPlayerInterior(playerid,5); SetPlayerPos(playerid,1299.14,-794.77,1084.00); return 1; } } if (strcmp("/exit",cmdtext,true,6) == 0) { if(IsPlayerInRangeOfPoint(playerid,10,1299.14,-794.77,1084.00)) { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,2045.5084228516,-1908.2283935547,12.99134349823); return 1; } } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == driving) { GameTextForPlayer(playerid,"~r~ /enter ~y~ to enter this building",5000,5); } return 1; }