12/12/2022 17:51 
	
	
	
		Faz o teste
	
	
	
Código PHP:
zcmd(venderveh, playerid, params[])
{
    new idcar = GetPlayerVehicleID(playerid);
    if(GetPlayerVehicleID(idcar) != PlayerVehicleInfo[playerid][0][pvID]) return Message(playerid, COLOR_GRAD2, "No estás en tu auto."); 
    if(VehicleOwner[idcar] != playerid) return Message(playerid, COLOR_GRAD2, "No estás en tu auto.");
    new id, valor;
    if(sscanf(params, "udi", id, valor)) return Message(playerid, COLOR_GRAD2, "Utilize: /venderveh <PlayerID> <Cantidad>");
    if(!IsPlayerConnected(id)) return Message(playerid, COLOR_GRAD2, "Jugador desconectado.");
    if(!ProxDetectorS(8.0, playerid, id)) return Message(playerid, COLOR_GRAD2, "Jugador muy lejos.");
    if(GetPlayerMoney(id) < valor) return Message(playerid, COLOR_GRAD2, "El jugador no tiene fondos suficientes.");
    if(PlayerVehicleInfo[id][0][pvModel] != 0) Message(playerid, COLOR_GRAD2, "El jugador ya tiene un vehículo.");
    if(PlayerInfo[id][pLevel] < 2) return Message(playerid, COLOR_GRAD2, "El jugador necesita ser mínimo nivel 2.");
    if(valor < 1 || valor > 99999999) return Message(playerid, COLOR_GRAD2, "Preço deve ser entre $1 - $99999999");
    SetPVarInt(playerid, "OwnableCarOffer", playerid);
    SetPVarInt(playerid, "OwnableCarID", idcar);
    SetPVarInt(playerid, "OwnableCarPrice", valor);
    SetPVarInt(playerid, "Petition_ID", 3);
    SetPVarInt(playerid, "Facturing", 1);
    new string[128];
    format(string, sizeof(string), "Ofreciste a %s tu vehículo por %d$", PlayerName(id), valor);
    SendClientMessage(playerid, COLOR_WHITE, string);
    format(string, sizeof(string), "\t\t-- Compra de Vehículo --\t\t\n\t* %s te ofrece su %s a %d$, ¿acepta?", PlayerName(playerid), GetVehicleFriendlyName(PlayerVehicleInfo[playerid][0][pvID]), valor);
    SendRequest(id,  string);
    return 1;
} 
 k2bi#9906[C.E.O]Brasil Play Socity

	   
	
