13.07.2014, 10:01
Olб galera do forum samp eu queria uma funзгo que vendia todos carros off line que o dono nгo loga a mais de 3 meses
Funзгo vender carro 1 por 1:
Funзгo vender carro 1 por 1:
PHP код:
if(!strcmp(cmdtext, "/avendercarro", true))
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= DONO)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != DONO)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
new Float:x,Float:y,Float:z;
new Float:a;
CarInfo[vehid][cOwned] = 0;
strmid(CarInfo[vehid][cOwner], "Dealership", 0, strlen("Dealership"), 999);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~w~Voce vendeu o veiculo!", 10000, 3);
GetVehiclePos(vehid, x, y, z);
GetVehicleZAngle(vehid, a);
CarInfo[vehid][cLocationx] = x;
CarInfo[vehid][cLocationy] = y;
CarInfo[vehid][cLocationz] = z;
CarInfo[vehid][cAngle] = a;
TaCongelado[playerid] = false;
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
format(CarInfo[vehid][cLicense], 32 ,"АVenda");
SetVehicleNumberPlate(vehid,CarInfo[vehid][cLicense]);
OnPropUpdate2(); SavePlayerData(playerid);
DestroyVehicle(vehid);
new thiscar = CreateVehicle(CarInfo[vehid][cModel],CarInfo[vehid][cLocationx],CarInfo[vehid][cLocationy],CarInfo[vehid][cLocationz]+1.0,CarInfo[vehid][cAngle],CarInfo[vehid][cColorOne],CarInfo[vehid][cColorTwo],60000);
LoadComponents(thiscar);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo estб autorizado a usar esse comando !");
return 1;
}
}
return 1;
}