31.07.2018, 15:06
PHP код:
stock CreateDealershipCar(playerid, name[MAX_PLAYER_NAME], price, Float:posX, Float:posY, Float:posZ, Float:angle)
{
new model = ReturnVehicleID(name);
new sendername[20];
if(GetPlayerMoney(playerid) < price) return SendClientMessage(playerid, 0xFFFFFFFF, "Vocк nгo tem dinheiro suficiente!");
{
new colorOne = 0 + random(255);
new colorTwo = 0 + random(255);
new idcar = CreateVehicle(model,posX,posY,posZ,angle,colorOne,colorTwo,60000);
InfoCarros[idcar][cModel] = model;
SendClientMessage(playerid, 0xFFFFFFFF, "Parabйns pelo seu carro!");
InfoCarros[idcar][cLocationx] = posX;
InfoCarros[idcar][cLocationy] = posY;
InfoCarros[idcar][cLocationz] = posZ;
InfoCarros[idcar][cAngle] = angle;
InfoCarros[idcar][cColorOne] = colorOne;
InfoCarros[idcar][cColorTwo] = colorTwo;
InfoCarros[idcar][cValue] = price;
InfoCarros[idcar][cOwned] = 1;
GivePlayerMoney(playerid,-price);
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(InfoCarros[idcar][cOwner], sendername, 0, strlen(sendername), 999);
SalvarCarros();
}
return 1;
}