17.05.2015, 23:15
PHP код:
CMD:ejetarplayer(playerid, params[])
{
new playa, PName[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME], string[256];
if(sscanf(params, "u", playa))
return SendClientMessage(playerid, -1, "Uso: /ejetarplayer [playerid/nick]");
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
return SendClientMessage(playerid,-1," Vocк nгo й o motorista do carro !");
if(playa == INVALID_PLAYER_ID || playa == playerid)
return SendClientMessage(playerid, -1, " ID/Nick - Invalido!");
if(!IsPlayerInVehicle(playa,GetPlayerVehicleID(playerid)))
return SendClientMessage(playerid, -1, " Este jogador nгo estб em seu carro !");
GetPlayerName(playerid,PName,sizeof(PName));
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Vocк expulsou o(a) %s para fora do carro!", giveplayer);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "* Vocк foi retirado do carro por %s !", PName);
SendClientMessage(playa, -1, string);
RemovePlayerFromVehicle(playa);
return true;
}