/linject?
#1

Hi there, I've seen this command in many servers,
All what it does is to inject someone in your vehicle (/linject [id]). for example, if you are in a hydra, you can do /linject and inject the chosen player.
Can someone help me with it? Thanks
Reply
#2

What does it do exactly,and hydra's can have 1 player in it as i know
Reply
#3

The hydra has a maximum of 2 slots.
Reply
#4

A Hydra has only one seat. The only planes with multiple seats are the Beagle, the Skimmer and the Dodo.
Reply
#5

Get the player's state... if the target is on foot and the playerid is on a hydra, Set the player state to PLAYER_STATE_PASSENGER
Reply
#6

Can you give me an example? I've tried to do it, but doesn't work
Reply
#7

It's not linject/inject, it's eject.

You'll need to make a command that uses GetPlayerState and RemovePlayerFromVehicle to remove a player from a vehicle. Search for one.
Reply
#8

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
It's not linject/inject, it's eject.

You'll need to make a command that uses GetPlayerState and RemovePlayerFromVehicle to remove a player from a vehicle. Search for one.
I don't mean like that, I mean like when you want to set a player as a passenger in your hydra.
Reply
#9

Are you wanting it to put the target player in the vehicle with you? I've got a command that teleports you into a players vehicle if you want to play around with it?

EDIT:

not sure if this is what you want. I can't test as i cant get anyone online to test with me.

pawn Код:
CMD:getincar(playerid,params[])
{
    new target;
    if(sscanf(params,"u",target))return SendClientMessage(playerid,-1,"SYNTAX: /getincar [id]");
    if(!IsPlayerConnected(playerid))return SendClientMessage(playerid,-1,"Player not connected");
    else
    {
        GetPlayerVehicleID(playerid);
        PutPlayerInVehicle(target,playerid,1);
    }
    return 1;
}
Reply
#10

I m using Sscanf and ZCMD
pawn Код:
CMD:inject(playerid, params[])
{
    new targetid, sid;
    if(sscanf(params, "ui", targetid, sid)) return SendClientMessage(playerid, -1, " USAGE:/inject (targetid) (seatid)");
   
    if(targetid == playerid) return SendClientMessage(playierd, -1, "You can't inject yourself");
    {
        new Vehid = GetPlayerVehicleID(playerid);
        PutPlayerInVehicle(targetid, Vehid, sid);
        SendClientMessage(playerid, -1, "You have Placed Your target in the car!");
        return 1;
    }
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)