[Req] 2 commands
#1

Where do i need to put these line?
Код:
SendClientMessage(playerid, COLOR_RED, "[SERVER]: You are not in a vehicle!");
Код:
if(strcmp(cmdtext, "/vr", true) == 0)
{
  if(IsPlayerVipMember(playerid)) {
    if(IsPlayerInAnyVehicle(playerid)) {
      SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
      RepairVehicle(GetPlayerVehicleID(playerid));
    }
    else SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a Vip Member!");
    return 1;
  }
}
Reply
#2

http://forum.sa-mp.com/index.php?topic=144062.0
Reply
#3

Quote:
Originally Posted by kmzr
That topic = died
Reply
#4

Quote:
Originally Posted by dclaw
Quote:
Originally Posted by kmzr
That topic = died
That topic is alive and is the correct one to request something like in your case.
Reply
#5

Quote:
Originally Posted by dclaw
Hello, i searched an hour for 2 command's.
The command /mute and /vr <- Vehicle Repair
i think they easy to make, if u are good script.
Im not a good scripter
Can somebody make one of them for me?
I want it only for VIP.
Here's The line:

Код:
if(IsPlayerVipMember(playerid))
pawn Код:
if(strcmp(cmdtext,"/vr",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerVipMember(playerid)) {
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
}}}}
Reply
#6

Quote:
Originally Posted by Razvann
pawn Код:
/* code */
IsPlayerConnected check is needless - player can't use commands if he isn't connected.
Reply
#7

I have this now:
Код:
	if(strcmp(cmdtext, "/vr", true) == 0)
	  {
			if(IsPlayerVipMember(playerid))
			{
			SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
			RepairVehicle(GetPlayerVehicleID(playerid));
			}
			else SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a Vip Member!");
			return 1;
		}
No error's, warn's But now u can use it when u are not in a vehicle
Who can make it that there's coming a text with: "U need to be in a vehicle to use this!"
Reply
#8

dcmd_vr(playerid,params[]) {
#pragma unused params
if(IsPlayerVipMember(playerid)) {
if (IsPlayerInAnyVehicle(playerid)) {
SetVehicleHealth(GetPlayerVehicleID(playerid),1000 .0);
return SendClientMessage(playerid,0xFF0000AA,"Vehicle Fixed");
} else return SendClientMessage(playerid,0xFF0000AA,"Error: You are not in a vehicle");
} else return SendClientMessage(playerid,0xFF0000AA,"ERROR: You Need To Be V.I.P To Use This Command");
}


________
Jailbroken
Reply
#9

Quote:
Originally Posted by dclaw
I have this now:
Код:
	if(strcmp(cmdtext, "/vr", true) == 0)
	  {
			if(IsPlayerVipMember(playerid))
			{
			SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
			RepairVehicle(GetPlayerVehicleID(playerid));
			}
			else SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a Vip Member!");
			return 1;
		}
No error's, warn's But now u can use it when u are not in a vehicle
Who can make it that there's coming a text with: "U need to be in a vehicle to use this!"
pawn Код:
if(strcmp(cmdtext, "/vr", true) == 0)
      {
            if(IsPlayerVipMember(playerid))
            {
            if(IsPlayerInAnyVehicle(playerid))
            {
            SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
            RepairVehicle(GetPlayerVehicleID(playerid));
            }
            else SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a Vip Member!");
            return 1;
            }
        }
Reply
#10

Can u make a MESSAGE coming?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)