Comand >>><<<
#1

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

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.
Reply
#3

Tansk a lot
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)