Admin Command List
#8

Tried yours, got like 4 errors...

Код:
\GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(830) : warning 217: loose indentation
\GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(832) : error 017: undefined symbol "pAdminLvl"
\GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(832) : warning 215: expression has no effect
\GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(832) : error 001: expected token: ";", but found "]"
\GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(832) : error 029: invalid expression, assumed zero
\GTA\SAMPSERV\filterscripts\SeifAdmin.pwn(832) : fatal error 107: too many error messages on one line
Here is an example code, for teleporting to a player. Maybe this could help you guys figure out the code for admin commands?

Код:
	if(strcmp(cmd, "/adgoto", true) == 0) // Teleports to a player
	{
		new Float:pX,Float:pY,Float:pZ;
		if (AccountInfo[playerid][AdminLevel] >= 1 || IsPlayerAdmin(playerid))
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, ORANGE, "USAGE: /adgoto [playername/id]");
				SendClientMessage(playerid, ORANGE, "FUNCTION: Will teleport to the specified player.");
				return 1;
			}
			new giveplayerid = ReturnUser(tmp);
			if(giveplayerid != INVALID_PLAYER_ID)
			{
			  if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
			  {
			  	GetPlayerPos(giveplayerid,pX,pY,pZ);
			  	SetVehiclePos(GetPlayerVehicleID(playerid),pX,pY,pZ+2);
		 		}
		 		else
		 		{
			  	GetPlayerPos(giveplayerid,pX,pY,pZ);
			  	SetPlayerPos(playerid,pX,pY,pZ+2);
			  }
			  SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid));
			}
			else if(giveplayerid == INVALID_PLAYER_ID)
			{
				format(string, sizeof(string), "%d is not an active player.", giveplayerid);
				SendClientMessage(playerid, RED, string);
			}
		}
		else SendClientMessage(playerid, RED, "You are not an admin with the required level.");
		return 1;
	}
Reply


Messages In This Thread
Admin Command List - by ablogwriter - 06.06.2010, 13:43
Re: Admin Command List - by Jochemd - 06.06.2010, 13:45
Re: Admin Command List - by ablogwriter - 06.06.2010, 13:46
Re: Admin Command List - by Ihsan_Cingisiz - 06.06.2010, 13:46
Re: Admin Command List - by Jochemd - 06.06.2010, 13:46
Re: Admin Command List - by ablogwriter - 06.06.2010, 13:50
Re: Admin Command List - by Jochemd - 06.06.2010, 13:52
Re: Admin Command List - by ablogwriter - 06.06.2010, 13:58
Re: Admin Command List - by Chrham_2 - 06.06.2010, 14:09
Re: Admin Command List - by ablogwriter - 06.06.2010, 14:18
Re: Admin Command List - by ablogwriter - 06.06.2010, 14:22
Re: Admin Command List - by ablogwriter - 06.06.2010, 14:25
Re: Admin Command List - by jamesbond007 - 06.06.2010, 14:26
Re: Admin Command List - by ablogwriter - 06.06.2010, 14:28

Forum Jump:


Users browsing this thread: 12 Guest(s)