SA-MP Forums Archive
None of the commands work - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: None of the commands work (/showthread.php?tid=131386)



None of the commands work - Mauka4 - 02.03.2010

Hey again,
Usually I dont like to use FS, I do almost everything in GM but now I have to use FS. Its very simple FS, just one cmd- /enter. Compiles with no problem but when I add it to server cfg and lounch it, none of the GM commands work. I am sure I am missing something but I dont want to waste more time looking at stuff I dont know. Anyone know whats up?
Here is the FS:
http://pastebin.com/343GgzDF


Re: None of the commands work - -Rebel Son- - 02.03.2010

Код:
    new cmd[256];
    if(strcmp(cmd, "/enter", true) == 0)
    {
      if(IsPlayerConnected(playerid))
            {
            if (IsPlayerInRangeOfPoint(playerid,2255.1226,-1517.4423,519.2906, 8.0))//Prison
            {
                SetPlayerInterior(playerid, 1);
                SetPlayerFacingAngle(playerid, 266.1816);
                SetPlayerPos(playerid,1765.4119,-1540.6046,-14.7936);
                }
                }
        return 1;
    }
    return 0;
}
this was the code you have.

Try this

Код:
    new cmd[256];

    if(strcmp(cmd, "/enter", true)) {
      if(IsPlayerConnected(playerid))
            {
            if (IsPlayerInRangeOfPoint(playerid,2255.1226,-1517.4423,519.2906, 8.0))//Prison
            {
                SetPlayerInterior(playerid, 1);
                SetPlayerFacingAngle(playerid, 266.1816);
                SetPlayerPos(playerid,1765.4119,-1540.6046,-14.7936);
        return 1;
    }
    return 0;
}



Re: None of the commands work - Kix - 02.03.2010

^


Re: None of the commands work - afei - 03.03.2010

Код:
  
new cmd[256];
Also you may want to read http://forum.sa-mp.com/index.php?topic=78026.0
Код:
if(!strcmp("/enter", cmdtext))
{
     if(IsPlayerConnected(playerid))
 	{
         if(IsPlayerInRangeOfPoint(playerid, 8.0, 2255.1226, -1517.4423, 519.2906))// float Range goes behind playerid not at the end
      	{
            SetPlayerInterior(playerid, 1);
            SetPlayerFacingAngle(playerid, 266.1816);
     		   SetPlayerPos(playerid, 1765.4119, -1540.6046, -14.7936);
		}
	}
	return 1;
}



Re: None of the commands work - adsy - 03.03.2010

cmd doesnt need to be over 128

make sure at the end of your game mode and filterscript function

onplayercommandtext they both return 0