SA-MP Forums Archive
Hi I need help with this pawno error code 030! Plz help Thnx - 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)
+--- Thread: Hi I need help with this pawno error code 030! Plz help Thnx (/showthread.php?tid=477743)



Hi I need help with this pawno error code 030! Plz help Thnx - MoeSal - 26.11.2013

This is the code

Код:
Line 212:public OnPlayerCommandText(playerid, cmdtext[])
{
//admin gate open cmd
     if(strcmp(cmdtext, "/og") == 0)
		{
        if(IsPlayerInRangeOfPoint(playerid, 20, 1354.28, -3439.05, 6.31))
		{
                MoveObject(AdminGate, 1354.28, -3440.25, 6.31, 2);
        		return 1;
        }
//admin gate close cmd
		if(strcmp(cmdtext, "/cg") == 0)
     	{
        if(IsPlayerInRangeOfPoint(playerid, 20, 1354.28, -3439.05, 6.31))
		{
                MoveObject(AdminGate, 1342.75, -3440.25, 6.31, 2);
        		return 1;
        }
//admin base tele
		if(strcmp(cmdtext, "/ab") == 0)
     	{
        SetPlayerPos(playerid, 1342.369018, -3435.039306, 4.463276);
  		return 1;
		}
//admin meet place
	 	if(strcmp(cmdtext, "/ent") == 0)
	 	{
		if(IsPlayerInRangeOfPoint(playerid, 5, 1351.277099,-3550.556152,4.079059))
        SetPlayerPos(playerid, 386.5259,173.6381,1008.3828);
       	SetPlayerInterior(playerid, 3);
		return 1;
        }
	 	if(strcmp(cmdtext, "/ent") == 0)
		{
		if(IsPlayerInRangeOfPoint(playerid, 5, 386.5259,173.6381,1008.3828))
		SetPlayerPos(playerid, 1351.277099,-3550.556152,4.079059);
        SetPlayerInterior(playerid, 0);
		return 1;
        }
//food place
	 	if(strcmp(cmdtext, "/ent") == 0)
		if(IsPlayerInRangeOfPoint(playerid, 5, 1021.908203,-3542.132324,4.277190))
        {
        SetPlayerPos(playerid, 365.7158, -9.8873, 1001.8516);
       	SetPlayerInterior(playerid, 9);
		return 1;
        }
	 	if(strcmp(cmdtext, "/ent") == 0)
		if(IsPlayerInRangeOfPoint(playerid, 5, 365.7158, -9.8873, 1001.8516))
        {
        SetPlayerPos(playerid, 1021.908203,-3542.132324,4.277190);
        SetPlayerInterior(playerid, 9);
		return 0;
      Line 265:  }



Re: Hi I need help with this pawno error code 030! Plz help Thnx - BizzyD - 26.11.2013

Try:

Код:
if(strcmp(cmdtext, "/ent") == 0)
if(IsPlayerInRangeOfPoint(playerid, 5, 365.7158, -9.8873, 1001.8516))
{
    SetPlayerPos(playerid, 1021.908203,-3542.132324,4.277190);
    SetPlayerInterior(playerid, 9);
	return 1;
}



Re : Hi I need help with this pawno error code 030! Plz help Thnx - EthanMason - 26.11.2013

Try this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

     if(strcmp(cmdtext, "/og") == 0)
     {
            if(IsPlayerInRangeOfPoint(playerid, 20, 1354.28, -3439.05, 6.31))
         {
                   MoveObject(AdminGate, 1354.28, -3440.25, 6.31, 2);
               return 1;
             }
     }
     if(strcmp(cmdtext, "/cg") == 0)
     {
            if(IsPlayerInRangeOfPoint(playerid, 20, 1354.28, -3439.05, 6.31))
        {
                      MoveObject(AdminGate, 1342.75, -3440.25, 6.31, 2);
                  return 1;
                }
     }
     if(strcmp(cmdtext, "/ab") == 0)
     {
           SetPlayerPos(playerid, 1342.369018, -3435.039306, 4.463276);
       return 1;
     }
     if(strcmp(cmdtext, "/ent") == 0)
     {
           if(IsPlayerInRangeOfPoint(playerid, 5, 365.7158, -9.8873, 1001.8516))
           {
               SetPlayerPos(playerid, 1021.908203,-3542.132324,4.277190);
               SetPlayerInterior(playerid, 9);
           }
           else if (IsPlayerInRangeOfPoint(playerid, 5, 1021.908203,-3542.132324,4.277190))
           {  
               SetPlayerPos(playerid, 365.7158, -9.8873, 1001.8516);
               SetPlayerInterior(playerid, 0);
           }
           return 1;
     }
     return 0;
}



Re: Hi I need help with this pawno error code 030! Plz help Thnx - MoeSal - 26.11.2013

Ok thnx gonna check it out when i go home


Re: Hi I need help with this pawno error code 030! Plz help Thnx - MoeSal - 26.11.2013

Thnx to all