04.12.2013, 15:34
Not that I am wrong, but all vehicles now also the server I get the message PROBANDO SIN DUEСO :c
pawn Код:
enum VehicleInfo
{
VID,
model,
vOwner,
vOwnerName,
Float:SpawnPos[4],
Lock,
vcolor1,
vcolor2,
carro
};
new vInfo[MAX_VEHICLES][VehicleInfo];
new vehid;
new InVehicle[MAX_PLAYERS];
new bool:validcar[MAX_VEHICLES];
stock GetFreeVehicleSlot()
{
for(new i = 0; i < sizeof(validcar); i ++)
{
if(!validcar[i]) return i;
}
return -1;
}
CMD:vehicle(playerid, params[])
{
if(pInfo[playerid][Adminlevel] >=1 || IsPlayerAdmin(playerid))
{
vehid = GetFreeVehicleSlot();
new car;
new string[128];
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(sscanf(params,"i", car)) return SendClientMessage(playerid,0xff0000ff,"USAGE: /Veh <Vehicle ID 400 - 611>");
vInfo[vehid][VID] = vehid;
vInfo[vehid][model] = car;
vInfo[vehid][vOwner] = 0;
vInfo[vehid][vOwnerName] = 0;
vInfo[vehid][SpawnPos][0] = X;
vInfo[vehid][SpawnPos][1] = Y;
vInfo[vehid][SpawnPos][2] = Z;
vInfo[vehid][SpawnPos][3] = 90.0;
vInfo[vehid][vcolor1] = 0;
vInfo[vehid][vcolor2] = 0;
validcar[vehid] = true;
vInfo[vehid][carro] = CreateVehicle(car, X + 2, Y, Z, 90, vInfo[vehid][vcolor1], vInfo[vehid][vcolor2], 999);
format(string,sizeof(string),"You Have Spawned Vehicle ID %i",car);
SendClientMessage(playerid, 0xffffffff, string);
// PutPlayerInVehicle(playerid, Vehicle[playerid], 0);
}
return 1;
}