30.11.2016, 18:06
Hello guys.
I was looking arround for a Eject command for players who are surfing on the car (standing on the roof).
Can someone help me with a command /eject witch drops the players from the car? Not from inside seats.
This is mine but I need one to eject and the players who stand on the car.
Thank you so much for help!
+REP
I was looking arround for a Eject command for players who are surfing on the car (standing on the roof).
Can someone help me with a command /eject witch drops the players from the car? Not from inside seats.
This is mine but I need one to eject and the players who stand on the car.
Код:
CMD:eject(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(IsPlayerConnected(playerid)) { new State; if(IsPlayerInAnyVehicle(playerid)) { new id,string[128],giveplayer[25]; State=GetPlayerState(playerid); if(State!=PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_WHITE, "{FFB870}You can only eject people as the driver."); if(sscanf(params, "u",id)) return SCM(playerid,0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/eject <Name/Playerid>"); new test; test = GetPlayerVehicleID(playerid); if(IsPlayerConnected(id)) { if(id != INVALID_PLAYER_ID) { if(PlayerTied[id] > 0) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}Player have tie."); if(id == playerid) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You cannot eject yourself."); if(IsPlayerInVehicle(id,test)) { new PName[MAX_PLAYER_NAME]; GetPlayerName(playerid,PName,sizeof(PName)); GetPlayerName(id, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "* You have thrown %s out of the car!", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* You have been thrown out the car by %s !", PName); SendClientMessage(id, COLOR_LIGHTBLUE, string); RemovePlayerFromVehicleEx(id); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "{FFB870}That player is not in your car."); return 1; } } } else { SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected."); } } else { SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You need to be in a vehicle to use this."); } } return 1; }
+REP