[FilterScript] [FS] /nos for admin
#1

Код:
//--------------------------------[Nos]---------------------------------------------------
  if(strcmp(cmd, "/nos", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(PlayerInfo[playerid][pAdmin] < 1337)
			{
			  SendClientMessage(playerid, COLOR_LIGHTGREEN, " You are not authorized to use that command! !");
			  return 1;
			}
			if(IsPlayerInAnyVehicle(playerid))
			{
			  AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
			  SendClientMessage(playerid, COLOR_LIGHTGREEN, "Nos installed from car!");
			}
		}
		return 1;
	}
Installed nos x10 for car
Reply
#2

Pretty basic but alright! good job.
Reply
#3

i Try to add it ....
But seriously ama big nub in scripting so can u help me?

I want to add dis cmd in my RP server for Owner which is admin level=6....
So please code one for me and please tell me where and how to add it

Help will be appreciated alot...Please helpme
Reply
#4

ok Topic Poster : this command wouldn't work cause u have to post the stock of the padmin and admin levels...
Reply
#5

You also can make.....
pawn Код:
if(strcmp(cmd, "/nos", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
        if(IsPlayerAdmin(playerid)
            {
              SendClientMessage(playerid, COLOR_LIGHTGREEN, " You are not authorized to use that command! !");
              return 1;
            }
            if(IsPlayerInAnyVehicle(playerid))
            {
              AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
              SendClientMessage(playerid, COLOR_LIGHTGREEN, "Nos installed from car!");
            }
        }
        return 1;
    }
Because
Код:
if(PlayerInfo[playerid][pAdmin] < 1337)
will work just for GF/RPG but my will work for ALL RCON admins
Reply
#6

pawn Код:
if(strcmp(cmdtext, "/nos", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You need to be admin");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You need to be in a vehicle");

AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
return 1;
}
Your code however was took of a RP script by the looks of it
This is the best possible way to do it,
It dosent use alot of lines
Reply
#7

Quote:
Originally Posted by Joe Torran C
pawn Код:
if(strcmp(cmdtext, "/nos", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You need to be admin");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You need to be in a vehicle");

AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
return 1;
}
Your code however was took of a RP script by the looks of it
I say him that too, i make for RCON too but your code is shortly and better
Reply
#8

Basic and Good!
Reply
#9

Good work ! Easy & Simple to make ...
Reply
#10

I still cannot use it...Please someone helpme...Am i adding or corrent or not.Please if someone got Teamviewer so plz come on msn and we will talk so dat u can edit it please??
Someone please help or ill Die.....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)