None of the commands work
#1

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
Reply
#2

Код:
    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;
}
Reply
#3

^
Reply
#4

Код:
  
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;
}
Reply
#5

cmd doesnt need to be over 128

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

onplayercommandtext they both return 0
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)