SA-MP Forums Archive
How to make a command work only at a certain spot - 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: How to make a command work only at a certain spot (/showthread.php?tid=70050)



How to make a command work only at a certain spot - zanakinz - 22.03.2009

Sorry for another post its just that its confusing well anyways ive tried if (PlayerToPoint(100,playerid, XXXX, YYYY, ZZZZ))

and it gives me this error:

Код:
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2193) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2222) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2258) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2259) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2286) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2757) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2768) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2780) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2784) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2796) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2800) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2804) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2808) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2812) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2816) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2820) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2824) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2836) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2840) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2844) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2848) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2852) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2864) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2868) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2872) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2884) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.



Re: How to make a command work only at a certain spot - Dujma - 22.03.2009

You are missing somewhere this { or this }


Re: How to make a command work only at a certain spot - zanakinz - 22.03.2009

i put another } at the bottom now i got 2 errors:

Код:
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(29204) : error 001: expected token: "*then", but found ")"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(29204) : error 029: invalid expression, assumed zero



Re: How to make a command work only at a certain spot - zanakinz - 22.03.2009

Srry for repost but.. here is the Code that im using
Код:
 if(!strcmp(cmdtext, "/equip",true))
{
if PlayerToPoint(100,playerid, 2137.6677,-2273.7737,14.7734))
{
	if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 6)
	{
	SafeGivePlayerWeapon(playerid, 5, 1);
	SafeGivePlayerWeapon(playerid, 24, 100);
	SafeGivePlayerWeapon(playerid, 25, 100);
	SafeGivePlayerWeapon(playerid, 34, 100);
	SafeGivePlayerWeapon(playerid, 29, 100);
	}
	return 1;
}
}



Re: How to make a command work only at a certain spot - Dujma - 22.03.2009

pawn Код:
if(strcmp(cmd, "/equip", true) == 0)
{
  if(PlayerToPoint(100,playerid, 2137.6677,-2273.7737,14.7734))
  {
    if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 6)
    {
      SafeGivePlayerWeapon(playerid, 5, 1);
      SafeGivePlayerWeapon(playerid, 24, 100);
      SafeGivePlayerWeapon(playerid, 25, 100);
      SafeGivePlayerWeapon(playerid, 34, 100);
      SafeGivePlayerWeapon(playerid, 29, 100);
    }
  }
  return 1;
}



Re: How to make a command work only at a certain spot - TheAngel105 - 22.03.2009

1. Correct your indenting, it's kinda strange, search for an indenting topic you should find it.
2. You have !strcmp which doesn't exist, if it would exist it would be like "if it's not compared" -_- .

Take a look at https://sampwiki.blast.hk/wiki/Strcmp


Re: How to make a command work only at a certain spot - FUNExtreme - 22.03.2009

pawn Код:
if (PlayerToPoint(100,playerid, 2137.6677,-2273.7737,14.7734))



Re: How to make a command work only at a certain spot - zanakinz - 22.03.2009

Thanks guys!! thank you Dujma for a fixed code thanks to FUNextreme for reminding me i deleted the ( in PlayerToPoint and thank you TheAngel for trying to help me!


Re: How to make a command work only at a certain spot - Dujma - 22.03.2009

Quote:
Originally Posted by zanakinz
Thanks guys!! thank you Dujma for a fixed code thanks to FUNextreme for reminding me i deleted the ( in PlayerToPoint and thank you TheAngel for trying to help me!
No problem and you should leave this How to make a command work only at a certain spot topic subject because maybe someone else will have this problem and when he use search he wont find this...