Scrmtp to zcmd -
ghzspark - 15.03.2013
I need help converting this script to zcmd:
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;
}
Thanks
Re: Scrmtp to zcmd -
DaRk_RaiN - 15.03.2013
pawn Код:
CMD:enter(playerid, params[])
{
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);
}
return 1;
}
CMD:exit(playerid, params[])
{
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;
}
Re: Scrmtp to zcmd -
Bicentric - 15.03.2013
EDIT: Above poster beat me didn't see that :P. However my version is indented correctly.
pawn Код:
COMMAND:enter(playerid, params[])
{
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);
}
return 1;
}
COMMAND:exit(playerid, params[])
{
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;
}
Re: Scrmtp to zcmd -
ghzspark - 15.03.2013
Thanks.