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



admin - Kar - 12.06.2010

Код:
if(strcmp(cmdtext, "/nos", true) == 0)
{
  if (PlayerInfo[playerid][pAdmin] >= 5)
  else
  (PlayerInfo[playerid][pAdmin] >= 4)
  SendClientMessage(playerid, RED, "ERROR:You Are Not High Enough Admin To Use This Command!");
	new vehicleid = GetPlayerVehicleID(playerid);
	AddVehicleComponent(vehicleid, 1010);
}
Код:
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(697) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(698 -- 699) : warning 215: expression has no effect
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(699) : error 001: expected token: ";", but found "-identifier-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
errr



Re: admin - wEstSidЂ - 12.06.2010

Thy this:

pawn Код:
if(strcmp(cmdtext, "/nos", true) == 0)
{
  if (PlayerInfo[playerid][pAdmin] >= 5)
  else
  (PlayerInfo[playerid][pAdmin] >= 4)
  SendClientMessage(playerid, RED, "ERROR:You Are Not High Enough Admin To Use This Command!");
  new vehicleid = GetPlayerVehicleID(playerid);
  AddVehicleComponent(vehicleid, 1010);
}
I just moved these 2 things because they were to much forward
new vehicleid = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicleid, 1010);


Re: admin - Kar - 12.06.2010

C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(697) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(698 -- 699) : warning 215: expression has no effect
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(699) : error 001: expected token: ";", but found "-identifier-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

<.<



Re: admin - Kar - 12.06.2010

it shows the error msg if your 5+ admin and if puts in nos and if ur 5- it puts in nos without saying the msg


Re: admin - Naxix - 12.06.2010

Код:
	if(strcmp(cmdtext, "/nos", true) == 0)
  {
  if (PlayerInfo[playerid][pAdmin] >= 5) return SendClientMessage(playerid, RED, "ERROR:You Are Not High Enough Admin To Use This Command!");
	new vehicleid = GetPlayerVehicleID(playerid);
	AddVehicleComponent(vehicleid, 1010);
return 1;
}
Try that.


Re: admin - DJDhan - 12.06.2010

Try this :P
Код:
if(!strcmp(cmdtext, "/nos", true, 4))
{
       if (PlayerInfo[playerid][pAdmin] <= 4) return SendClietnMessage(playerid,0xffffffaa,"You do not have a high enough level to use this command");
 	new vehicleid = GetPlayerVehicleID(playerid);
	AddVehicleComponent(vehicleid, 1010);
       return ;
}