Put Player in vehicle command
#2

PHP Code:
CMD:pinc(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] >= 1)
    {
        new 
idseatidAdminName[MAX_PLAYER_NAME], string[128], tt[MAX_PLAYER_NAME], strr[128];
        
GetPlayerName(playeridAdminNamesizeof(AdminName));
        if(
sscanf(params"ud"idseatid)) return SendClientMessage(playeridWHITE"USAGE:/pinc [partofname/playerid] [seatID]");
        if(
id == INVALID_PLAYER_IDSendClientMessage(playeridRED"Player not found!");
        if(!
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playeridRED"You have to be in a car to use this command!");
        if(
seatid >= || seatid 1) return SendClientMessage(playeridRED"Invalid SeatID!");
        new 
Float:pincXFloat:pincYFloat:pincZcurtvehvehseat;
        
curtveh GetPlayerVehicleID(playerid);
        
vehseat GetPlayerVehicleSeat(id);
        if(
IsSeatTaken(curtvehseatid)==1reutn SendClientMessage(playeridRED"This seat is already taken.");
        
GetVehiclePos(curtvehpincXpincYpincZ);
        
PutPlayerInVehicle(id,curtveh,seatid);
        }
    else 
SendClientMessage(playeridRED"You are not a admin!");
    return 
1;

Reply


Messages In This Thread
Put Player in vehicle command - by Stoyanov - 01.01.2015, 18:44
Re: Put Player in vehicle command - by ATGOggy - 02.01.2015, 05:13
Re: Put Player in vehicle command - by NourNN - 17.12.2015, 06:10
Re: Put Player in vehicle command - by Ritzy2K - 17.12.2015, 06:46
Re: Put Player in vehicle command - by JaKe Elite - 17.12.2015, 09:02

Forum Jump:


Users browsing this thread: 2 Guest(s)