/enter help -
Dare Devil..... - 28.07.2012
Can someone helpme with this?
pawn Код:
{
if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, -2718.7581,-318.1504,7.8438))
SetPlayerPos(playerid,-27.2596,-158.7045,1011.7094);//college
return 1;
}
else if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2665.6848,-7.8725,6.1328 ))
SetPlayerPos(playerid,53.3778,-188.6606,998.3098);
return 1;
}
else if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,-2717.7808,52.1632,4.3359))
SetPlayerPos(playerid,772.111999,-3.898649,1000.728820);
SetPlayerInterior(playerid, 5);//gym
return 1;
}
else if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, -27.2596,-158.7045,1011.7094 ))
SetPlayerPos(playerid,-2718.7581,-318.1504,7.8438);//college
return 1;
}
else if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 53.3778,-188.6606,998.3098 ))
SetPlayerPos(playerid,-2665.6848,-7.8725,6.1328);
return 1;
}
else if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 772.111999,-3.898649,1000.728820))
SetPlayerPos(playerid,-2717.7808,52.1632,4.3359);
SetPlayerInterior(playerid, 0);//gym
return 1;
}
Only first enter and first exit works else give no response
Any help please?
Re: /enter help -
Hervest1998 - 28.07.2012
Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/Command",true))
{
if(IsPlayerInRangeOfPoint(...)) SetPlayerPos(...);
else if(...) SetPlayerPos(...);
else if(...) SetPlayerPos(...);
else if(...) SetPlayerPos(...);
else SetPlayerPos(...);
return 1;
}
return 0;
}
Re: /enter help -
Dare Devil..... - 28.07.2012
I didnt understand Please make it understandable.
Re: /enter help -
Devilxz97 - 28.07.2012
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, -2718.7581,-318.1504,7.8438))
{
SetPlayerPos(playerid,-27.2596,-158.7045,1011.7094);
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, -2665.6848,-7.8725,6.1328 ))
{
SetPlayerPos(playerid,53.3778,-188.6606,998.3098);
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,-2717.7808,52.1632,4.3359))
{
SetPlayerPos(playerid,772.111999,-3.898649,1000.728820);
SetPlayerInterior(playerid, 5);//gym
}
if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, -27.2596,-158.7045,1011.7094 ))
{
SetPlayerPos(playerid,-2718.7581,-318.1504,7.8438);//college
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 53.3778,-188.6606,998.3098 ))
{
SetPlayerPos(playerid,-2665.6848,-7.8725,6.1328);
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 772.111999,-3.898649,1000.728820))
{
SetPlayerPos(playerid,-2717.7808,52.1632,4.3359);
SetPlayerInterior(playerid, 0);//gym
}
}
return 1;
}
return 1;
}
try this . .
Re: /enter help -
Kalel - 28.07.2012
Hi, Daredevil, you can make a alone command which the name is "/enter". If this command make a lot of things, you use the conditions if, else if, else in the command.
Re: /enter help -
Devilxz97 - 28.07.2012
yea , im agree with ya kalel
Re: /enter help -
Dare Devil..... - 28.07.2012
Devil XZ97 that also don't work.
Re: /enter help -
TaLhA XIV - 28.07.2012
Do it the way devil did it always works