public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/enter", true)) { if(IsPlayerInRangeOfPoint(playerid, 3.0, 1366.3108,-1279.5417,13.5469)) { SetPlayerPos(playerid, 286.148986,-40.644397,1001.515625);//AmmunationEntrance SetPlayerInterior(playerid, 1); return 1; } if(IsPlayerInRangeOfPoint(playerid, 3.0, 2229.5374,-1721.7302,13.5658)) { SetPlayerPos(playerid, 773.579956,-77.096694,1000.655029);//GantonGymEntrance SetPlayerInterior(playerid, 7); return 1; } if(IsPlayerInRangeOfPoint(playerid, 3.0, 1284.6202,-1585.2909,13.5469)) { SetPlayerPos(playerid, -2029.798339,-106.675910,1035.171875);//LicenseCenterEntrance SetPlayerInterior(playerid, 3); return 1; } return 1; }
CMD:enter(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1366.3108,-1279.5417,13.5469))
{
SetPlayerPos(playerid, 286.148986,-40.644397,1001.515625);//AmmunationEntrance
SetPlayerInterior(playerid, 1);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2229.5374,-1721.7302,13.5658))
{
SetPlayerPos(playerid, 773.579956,-77.096694,1000.655029);//GantonGymEntrance
SetPlayerInterior(playerid, 7);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1284.6202,-1585.2909,13.5469))
{
SetPlayerPos(playerid, -2029.798339,-106.675910,1035.171875);//LicenseCenterEntrance
SetPlayerInterior(playerid, 3);
return 1;
}
return 1;
}
if(!strcmp(cmdtext, "/enter", true)) // ! here it should be if (strcmp("/mycommand", cmdtext, true, 10) == 0)
Okay, put this at the bottom of your script:
pawn Код:
|