RCON only
#10

Quote:
Originally Posted by Vasu99
Посмотреть сообщение
No no, I mean. I cant come here and ask you everytime i want to know how to do this, So could you teach me?
Sure, It's not that hard. You want to know how to make such commands right? I will help you with each line.

pawn Код:
COMMAND:repair(playerid, params[])
    {
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not logged in as RCON ADMIN!");
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
        RepairVehicle(GetPlayerVehicleID(playerid));
        SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
        return 1;
    }
In this command you will see

pawn Код:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not logged in as RCON ADMIN!");
This means that if player is NOT an admin "!" sign shows NO, so If the playerid is not an Admin he will get the message that he is not an Admin or not logged in as an Admin.

pawn Код:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
Here, it means if the player is NOT in the car he will get the message saying that he is not in any vehicle.

pawn Код:
RepairVehicle(GetPlayerVehicleID(playerid));
 SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
"ReparVehicle", it repairs the vehicle, and the vehicle is THE same VEHICLE in which a player is sitting, GetPlayerVehicleID is used to get the vehicle id to repair it. SendClientMessage always send the message to the player.

I Hope it helps you, if you have any question you can ask me.

-FalconX
Reply


Messages In This Thread
RCON only - by rpx - 01.03.2012, 13:39
Re: RCON only - by FalconX - 01.03.2012, 13:46
Re: RCON only - by rpx - 01.03.2012, 13:53
Re: RCON only - by Ballu Miaa - 01.03.2012, 13:54
Re: RCON only - by Vasu99 - 01.03.2012, 13:57
Re: RCON only - by FalconX - 01.03.2012, 13:57
Re: RCON only - by rpx - 01.03.2012, 14:04
Re: RCON only - by FalconX - 01.03.2012, 14:06
Re: RCON only - by Vasu99 - 01.03.2012, 14:21
Re: RCON only - by FalconX - 01.03.2012, 14:40

Forum Jump:


Users browsing this thread: 2 Guest(s)