09.03.2013, 13:13
Is there any way to enter a command as a different player, this is in my code
However, I would nuch rather it be something like this
Because those commands already have messages that are being sent out to all players. I could just copy/paste messages into here but then if I need to make any changes ion the fuutre, I will probably forget to edit this one resulting in the wrong messsage being displayed
pawn Код:
if (PRESSED(KEY_CTRL_BACK))
{
if(pInfo[playerid][Admin] > 1){
if(IsPlayerInAnyVehicle(playerid))
{
new vehicle = GetPlayerVehicleID(playerid);
SetVehicleHealth(vehicle, 100.00);
RepairVehicle(vehicle);
}
else
{
SetPlayerHealth(playerid, 100.00);
SetPlayerArmour(playerid, 100.00);
}
}
}
pawn Код:
if (PRESSED(KEY_CTRL_BACK))
{
if(pInfo[playerid][Admin] > 1){
if(IsPlayerInAnyVehicle(playerid))
{
EnterCommandFromPlayer(playerid, "/healcar");
} else {
new healme[128];
format(healme, sizeof(healme), "/heal %i", playerid);
EnterCommandFromPlayer(playerid, healme);
}
}
}