15.03.2013, 17:33
I need help converting this script to zcmd:
Thanks
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/enter", true))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2302.4021,-16.1874,26.4844)) // PC Bank
{
SetPlayerPos(playerid, 286.148986,-40.644397,1001.515625);//AmmunationEntrance
SetPlayerInterior(playerid, 1);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2269.5764,-74.9499,26.7724)) // PC Hospital
{
SetPlayerPos(playerid, 773.579956,-77.096694,1000.655029);//GantonGymEntrance
SetPlayerInterior(playerid, 7);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2305.6069,82.9115,26.4787)) // PC San News
{
SetPlayerPos(playerid, -2029.798339,-106.675910,1035.171875);//LicenseCenterEntrance
SetPlayerInterior(playerid, 3);
}
}
if(!strcmp(cmdtext, "/exit", true))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 286.148986,-40.644397,1001.515625))
{
SetPlayerPos(playerid, 1366.3108,-1279.5417,13.5469);//AmmunationExit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 286.148986,-40.644397,1001.515625))
{
SetPlayerPos(playerid, 1366.3108,-1279.5417,13.5469);//AmmunationExit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 773.579956,-77.096694,1000.655029))
{
SetPlayerPos(playerid, 2229.5374,-1721.7302,13.5658);//GantonGymExit
SetPlayerInterior(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, -2029.798339,-106.675910,1035.171875))
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1284.6202,-1585.2909,13.5469);//LicenseCenterExit
}
}
return 1;
}