Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext,"/GS", true, 10) == 0)
{
SetPlayerPos(playerid,1937.8898,-1769.1318,13.3828);//Gas Station Idlewood
return 1;
}
if (strcmp(cmdtext,"/LSPD", true, 10)==0)
{
SetPlayerPos(playerid,1548.4966,-1674.3378,14.5427); //LSPD
return 1;
}
if (strcmp(cmdtext,"/LSFD",true,10)==0)
{
SetPlayerPos(playerid,603.1935,-1522.2202,15.0735);
return 1;
}
if (strcmp(cmdtext,"/FBIHQ", true,10)==0)
{
SetPlayerPos(playerid,1332.8921,-985.8945,33.8966);
return 1;
}
if (strcmp(cmdtext,"/LSHos",true,10)==0)
{
SetPlayerPos(playerid,1174.4901,-1323.8148,14.7891);
return 1;
}
if (strcmp(cmdtext,"/LSCH",true,10)==0)
{
SetPlayerPos(playerid,1481.5734,-1750.9623,15.4453); //LSCH
return 1;
}
if (strcmp(cmdtext,"/buymenu",true, 10) ==0)
{
ShowPlayerDialog(playerid,1, DIALOG_STYLE_LIST, "What you need?","Chicken (10$)\nPizza (8$)\nBurger (5$)","BUY","Cancel"); //Food list
return 1;
}
if (strcmp(cmdtext, "/help",true, 10) == 0)
{
SendClientMessage(playerid, -1, ""RED"SERVER:"WHITE"You can "YELLOW"ask "WHITE"Your "RED"Questions "WHITE" On "YELLOW"Help "WHITE"Chat "YELLOW"(Use: /h your question)");
return 1;
}
if (strcmp(cmdtext, "/Refuel", true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1937.8898, -1769.1318, 13.3828))
{
ShowPlayerDialog(playerid,2, DIALOG_STYLE_LIST, "Choose Amount","big tank 100%(20$) \nMedium tank 50%(10$) \nSmall tank 20%(5$)","BUY","Cancel");
}
else
{
SendClientMessage(playerid, -1, "You must stay on "YELLOW"Gas Station "WHITE"to refuel");
return 1;
}
}
if (strcmp(cmdtext,"/enter", true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1480.6566,-1767.8955,18.7958))
{
SendClientMessage(playerid,-1,""YELLOW"Please Wait,objects have loading ");
SetPlayerPos(playerid, 384.808624,173.804992,1008.382812);
SetPlayerInterior(playerid,3);
TogglePlayerControllable(playerid,0);
SetTimerEx("Unfreeze1", 2000, false, "i", playerid);
return 1;
}
else
{
SendClientMessage(playerid,-1, ""YELLOW"You are't near any entry point");
return 1;
}
}
if (strcmp(cmdtext,"/enter", true, 10) == 0)
{
if (IsPlayerInRangeOfPoint(playerid, 4.0, 1332.8921,-985.8945,33.8966))
{
SetPlayerPos(playerid, 366.5000000, 162.7000000, 1013.5999800);
SetPlayerInterior(playerid, 3);
SendClientMessage(playerid,-1,"please wait objects have load");
TogglePlayerControllable(playerid,0);
SetTimerEx("Unfreeze1", 2000, false, "i", playerid);
return 1;
}
}
if (strcmp(cmdtext, "/Enter", true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.5, 1553.5604, -1675.2515, 16.1953))
{
SendClientMessage(playerid,-1,""YELLOW"Please Wait,objects have loading ");
SetPlayerPos(playerid, 246.375991,109.245994,1003.418750);//LSPD enter
SetPlayerInterior(playerid, 10);
TogglePlayerControllable(playerid,0);
SetTimerEx("Unfreeze", 3000, false, "i", playerid);
return 1;
}
}
if (strcmp(cmdtext,"/enter", true, 10) == 0)
{
if (IsPlayerInRangeOfPoint(playerid, 4.0, 1174.4901, -1323.8148, 14.7891))
{
SendClientMessage(playerid,-1,"please wait objects have load");
SetPlayerInterior(playerid,15);
SetPlayerPos(playerid,2215.454833,-1147.475585,1025.796875);
TogglePlayerControllable(playerid,0);
SetTimerEx("Unfreeze1", 2000, false, "i", playerid);
return 1;
}
}
if (strcmp(cmdtext,"/enter", true, 10) == 0)
{
if (IsPlayerInRangeOfPoint(playerid, 4.0, 603.1935,-1522.2202,15.0735))
{
SendClientMessage(playerid,-1,"please wait objects have load");
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid, 366.10001,161.8,1017.20001);
return 1;
}
}
if (strcmp(cmdtext,"/exit", true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0,384.808624,173.804992,1008.382812))
{
SetPlayerPos(playerid,1480.6566,-1767.8955,18.7958);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,-1,"You Leave "YELLOW"LSCH"WHITE" building");
return 1;
}
else
{
SendClientMessage(playerid,-1, ""YELLOW"You are't near any exit point");
return 1;
}
}
if (strcmp(cmdtext, "/exit", true, 10) == 0)
{
if (IsPlayerInRangeOfPoint(playerid, 10.0, 246.375991,109.245994,1003.418750))//lspd exit
{
SendClientMessage(playerid,-1," You leave "YELLOW"LSPD"WHITE" Building ");
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1553.5604, -1675.2515, 16.1953);//lspd entry
return 1;
}
}
if (strcmp(cmdtext,"/exit", true, 10) == 0)
{
if (IsPlayerInRangeOfPoint(playerid, 4.0,366.8999900,162.1000100,1019.0000000))
{
SendClientMessage(playerid,-1,"You Leave "YELLOW"FBI"WHITE" Building ");
SetPlayerPos(playerid,1332.8921,-985.8945,33.8966);
SetPlayerInterior(playerid,0);
return 1;
}
}
if (strcmp(cmdtext,"/exit", true, 10) == 0)
{
if (IsPlayerInRangeOfPoint(playerid,4.0,2215.454833,-1147.475585,1025.796875))
{
SendClientMessage(playerid,-1,"You Leave "YELLOW"LS Hospital "WHITE"Building");
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1174.4901, -1323.8148, 14.7891);
return 1;
}
}
if (strcmp(cmdtext,"/exit", true, 10) == 0)
{
if (IsPlayerInRangeOfPoint(playerid, 4.0, 366.10001,161.8,1017.20001))
{
SendClientMessage(playerid,-1,"You Leave "YELLOW"FD"WHITE" Building");
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 603.1935,-1522.2202,15.0735);
return 1;
}
}
return 0;
}
Probably because you made 5+ ENTER COMMANDS.