CMD:eject(playerid,params[])
{
if(AccInfo[playerid][Level] >= 3)
{
new player1, string[128], Float:x, Float:y, Float:z;
//----------------------------------------------------------------------
if(sscanf(params, "u", player1)) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /eject [PlayerID]") &&
SendClientMessage(playerid, orange, "Function: Will Ejected from vehicle a specified player");
//----------------------------------------------------------------------
if(AccInfo[player1][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return
SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
//----------------------------------------------------------------------
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
{
if(IsPlayerInAnyVehicle(player1))
{
SendCommandToAdmins(playerid,"Eject");
if(player1 != playerid)
{
format(string,sizeof(string),"|- Administrator \"%s\" has Ejected you from your Vehicle -|", pName(playerid));
SendClientMessage(player1,blue,string);
}
format(string,sizeof(string)," |- You have ejected \"%s\" from their Vehicle -|", pName(player1));
SendClientMessage(playerid,BlueMsg,string);
GetPlayerPos(player1,x,y,z);
return SetPlayerPos(player1,x,y,z+3);
}
else return SendClientMessage(playerid,red,"ERROR: Player is not in a vehicle");
}
else return ErrorMessages(playerid, 2);
}
else return ErrorMessages(playerid, 1);
}
Originally Posted by ******
Scripting Help
Provide Details - If you do not get help, please re-evaluate the explanation of the issue you provided, it may not be providing enough information for people to help you. No Useless Replies - If you are unsure or don't know how to proceed with solving an issue, then do not respond to the thread, it will be considered spam. Provide Code - People are not psychic, if there's an issue in your code they need to see that code. If you are worried about people stealing it, don't be - its nothing special! If you are unwilling to provide code and want help in private, post here and be prepared to wait a long time and pay a lot of money. Do Not Post Untested Code - If you are replying to a problem and you haven't confirmed that your code will work, you are likely to make the problem worse, not better. Script Requests - If you are requesting a script be made for you, rather than help with your coding, post in the Looking for scripters/helpers? Post here! Thread. |