SA-MP Forums Archive
Comand >>><<< - 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: Comand >>><<< (/showthread.php?tid=97896)



Comand >>><<< - monster010 - 17.09.2009

I have this command, it will explain what it does, an admin can get into a car which I began to make inchuiata order but only know what to do, you can help me?
Код:
 if(strcmp(cmd ,"/carunlock", true )== 0)
  {
	  if(IsPlayerConnected(playerid))
	  {
		 if(PlayerInfo[playerid][pAdmin]>=1)
		 {
			  for(new c=0;c<CAR_AMOUNT;c++)
			  {
				  new Fload:r1,Floar:r2,Floatr3;
				  if(PlayerToPoint(4.0,playerid,r1,r2,r3))
				  {
						 gCarLock[c] = 0;
						 SendClientMessage(playerid, COLOR_GREY, "Cea mai apropiata masina de tine a fost deschisa");
				  }
	      }
	    }
	  }
	  
  }
When I compile give 2 warnings appear:
Код:
C:\Documents and Settings\Claudiu\Desktop\Chestii !\EnGame\gamemodes\Mortalii.pwn(19330) : warning 213: tag mismatch
C:\Documents and Settings\Claudiu\Desktop\Chestii !\EnGame\gamemodes\Mortalii.pwn(19330) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:      6916 bytes
Code size:     1407824 bytes
Data size:     2339444 bytes
Stack/heap size:   16384 bytes; estimated max. usage=4904 cells (19616 bytes)
Total requirements: 3770568 bytes

2 Warnings.



Re: Comand >>><<< - Paladin - 17.09.2009

It took me a while since I was distracted by your display picture >.<
but here, try this.

Код:
 if(strcmp(cmd ,"/carunlock", true )== 0)
  {
	  if(IsPlayerConnected(playerid))
	  {
		 if(PlayerInfo[playerid][pAdmin]>=1)
		 {
			  for(new c=0;c<CAR_AMOUNT;c++)
			  {
				  new Fload:r1,Floar:r2,Floatr3;
                  GetPlayerPos(playerid, r1, r2, r3);
				  if(PlayerToPoint(4.0,playerid,r1,r2,r3))
				  {
						 gCarLock[c] = 0;
						 SendClientMessage(playerid, COLOR_GREY, "Cea mai apropiata masina de tine a fost deschisa");
				  }
	      }
	    }
	  }
	  
  }
You have to GetPlayerPos, you left that out.


Re: Comand >>><<< - monster010 - 18.09.2009

Tansk a lot