Commands not working
#1

Hey, I have a problem, my server's commands don't work at all, they worked earlier but I change something and I don't remember how to make them work again >.< here's the code:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
 	if (strcmp("/salir", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, 933.206359, 2150.355224, 1011.023437))
    	{
    		SetPlayerPos(playerid, 2530.502197, -1664.375976, 15.166466);
    		SetPlayerInterior(playerid, 0);
		}
		return 1;
	}
 	if (strcmp("/entrar", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, 2530.567871, -1664.283691, 15.166399))
	    {
	        SetPlayerPos(playerid, 933.206359, 2150.355224, 1011.023437);
	        SetPlayerInterior(playerid, 1);
		}
		return 1;
	}
	if (strcmp("/abrir1", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, 960.474548, 2097.345703, 1011.022705))
		{
	        GivePlayerWeapon(playerid, 22, 50);
	        SetPlayerSkin(playerid, 28);
	 	}
	 	return 1;
	}
	if (strcmp("/abrir2", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, 960.474548, 2097.345703, 1011.022705))
	    {
	        GivePlayerWeapon(playerid, 23, 50);
	        SetPlayerSkin(playerid, 180);
		}
		return 1;
	}
	if (strcmp("/abrir3", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, 960.474548, 2097.345703, 1011.022705))
	    {
	        GivePlayerWeapon(playerid, 25, 50);
	        SetPlayerSkin(playerid, 29);
		}
		return 1;
	}
}
Reply
#2

try this:

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
if (
strcmp("/salir"cmdtexttrue10) == 0)
{
if(
IsPlayerInRangeOfPoint(playerid3.0933.2063592150.3552241011.023437))
{
SetPlayerPos(playerid2530.502197, -1664.37597615.166466);
SetPlayerInterior(playerid0);
}
return 
1;
}
else if (
strcmp("/entrar"cmdtexttrue10) == 0)
{
if(
IsPlayerInRangeOfPoint(playerid3.02530.567871, -1664.28369115.166399))
{
SetPlayerPos(playerid933.2063592150.3552241011.023437);
SetPlayerInterior(playerid1);
}
return 
1;
}
else if (
strcmp("/abrir1"cmdtexttrue10) == 0)
{
if(
IsPlayerInRangeOfPoint(playerid3.0960.4745482097.3457031011.022705))
{
GivePlayerWeapon(playerid2250);
SetPlayerSkin(playerid2;
}
return 
1;
}
if (
strcmp("/abrir2"cmdtexttrue10) == 0)
{
if(
IsPlayerInRangeOfPoint(playerid3.0960.4745482097.3457031011.022705))
{
GivePlayerWeapon(playerid2350);
SetPlayerSkin(playerid180);
}
return 
1;
}
else if (
strcmp("/abrir3"cmdtexttrue10) == 0)
{
if(
IsPlayerInRangeOfPoint(playerid3.0960.4745482097.3457031011.022705))
{
GivePlayerWeapon(playerid2550);
SetPlayerSkin(playerid29);
}
return 
1;
}

Reply
#3

Nothing :/ still dont work, cant it have something to do with returns? S:
Reply
#4

wow,sorry,try this

Код:
public OnPlayerCommandText(playerid, cmdtext[]) 
{ 
if (strcmp("/salir", cmdtext, true, 10) == 0) 
{ 
if(IsPlayerInRangeOfPoint(playerid, 3.0, 933.206359, 2150.355224, 1011.023437)) 
{ 
SetPlayerPos(playerid, 2530.502197, -1664.375976, 15.166466); 
SetPlayerInterior(playerid, 0); 
}
} 
else if (strcmp("/entrar", cmdtext, true, 10) == 0) 
{ 
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2530.567871, -1664.283691, 15.166399)) 
{ 
SetPlayerPos(playerid, 933.206359, 2150.355224, 1011.023437); 
SetPlayerInterior(playerid, 1); 
} 
} 
else if (strcmp("/abrir1", cmdtext, true, 10) == 0) 
{ 
if(IsPlayerInRangeOfPoint(playerid, 3.0, 960.474548, 2097.345703, 1011.022705)) 
{ 
GivePlayerWeapon(playerid, 22, 50); 
SetPlayerSkin(playerid, 2; 
} 
} 
else if (strcmp("/abrir2", cmdtext, true, 10) == 0) 
{ 
if(IsPlayerInRangeOfPoint(playerid, 3.0, 960.474548, 2097.345703, 1011.022705)) 
{ 
GivePlayerWeapon(playerid, 23, 50); 
SetPlayerSkin(playerid, 180); 
} 
} 
else if (strcmp("/abrir3", cmdtext, true, 10) == 0) 
{ 
if(IsPlayerInRangeOfPoint(playerid, 3.0, 960.474548, 2097.345703, 1011.022705)) 
{ 
GivePlayerWeapon(playerid, 25, 50); 
SetPlayerSkin(playerid, 29); 
}
}
return 1;
}
Reply
#5

Not working, its so weird :/
Reply
#6

This?
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
 	if (strcmp("/salir", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, 933.206359, 2150.355224, 1011.023437))
    	{
    		SetPlayerPos(playerid, 2530.502197, -1664.375976, 15.166466);
    		SetPlayerInterior(playerid, 0);
		}
		return 1;
	}
 	else if (strcmp("/entrar", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, 2530.567871, -1664.283691, 15.166399))
	    {
	        SetPlayerPos(playerid, 933.206359, 2150.355224, 1011.023437);
	        SetPlayerInterior(playerid, 1);
		}
		return 1;
	}
	else if (strcmp("/abrir1", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, 960.474548, 2097.345703, 1011.022705))
		{
	        GivePlayerWeapon(playerid, 22, 50);
	        SetPlayerSkin(playerid, 28);
	 	}
	 	return 1;
	}
	else if (strcmp("/abrir2", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, 960.474548, 2097.345703, 1011.022705))
	    {
	        GivePlayerWeapon(playerid, 23, 50);
	        SetPlayerSkin(playerid, 180);
		}
		return 1;
	}
	else if (strcmp("/abrir3", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, 960.474548, 2097.345703, 1011.022705))
	    {
	        GivePlayerWeapon(playerid, 25, 50);
	        SetPlayerSkin(playerid, 29);
		}
		return 1;
	}
	return 0;
}
Oh, the copy paste fucked up some tabs, so you gotta make it look pretty again.
Reply
#7

Not working either :/ i noticed that the commands from filterscripts work, so i guess the problem is in the code i posted.
Reply
#8

Quote:
Originally Posted by aalbero99
Посмотреть сообщение
Not working either :/ i noticed that the commands from filterscripts work, so i guess the problem is in the code i posted.
Do me a favour, dont load the filterscripts at all, and try the commands then.
Reply
#9

LOL worked now, gonna figure out which filterscript is giving problems, thank you!!
Reply
#10

Quote:
Originally Posted by aalbero99
Посмотреть сообщение
LOL worked now, gonna figure out which filterscript is giving problems, thank you!!
No problem, Filterscripts will be used first, last its the game mode. So when you do a command, it checks the commands in the FS's first.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)