27.01.2014, 11:51
PHP код:
else if(dialogid == 11) // Bikes
{
new string[128], carid, price;
if(response)
{
switch(listitem)
{
case 0: {carid = 481; price = 500;} //BMX
case 1: {carid = 462; price = 1000;} //Faggio
case 2: {carid = 586; price = 9000;} //Wayfarer
case 3: {carid = 463; price = 14000;} //Freeway
case 4: {carid = 521; price = 17000;} //FCR-900
case 5: {carid = 581; price = 19000;} //BF-400
case 6: {carid = 461; price = 20000;} //PCJ-600
case 7: {carid = 471; price = 15000;} //Quad
}
if(price > PlayerInfo[playerid][pMoney]) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money on you.");
GiveDodMoney(playerid, -price);
format(string, sizeof(string), " You have purchased a %s. (Unlock it using /lock)", RVN(carid));
SendClientMessage(playerid, COLOR_GREEN, string);
if(PlayerInfo[playerid][vModel])
{
PlayerInfo[playerid][pVVeh] = CreateVehicle(carid, -144.9922,1117.5718,19.7500,0.8660,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vVLocked] = 1;
PlayerInfo[playerid][vVModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVX], PlayerInfo[playerid][vVY], PlayerInfo[playerid][vVZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVA]);
PlayerInfo[playerid][vVC1] = 0;
PlayerInfo[playerid][vVC2] = 0;
return 1;
}
if(PlayerInfo[playerid][vVModel])
{
PlayerInfo[playerid][pVVVeh] = CreateVehicle(carid, -144.9922,1117.5718,19.7500,0.8660,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVVVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vVVLocked] = 1;
PlayerInfo[playerid][vVVModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVVVeh], PlayerInfo[playerid][vVVX], PlayerInfo[playerid][vVVY], PlayerInfo[playerid][vVVZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVVVeh], PlayerInfo[playerid][vVVA]);
PlayerInfo[playerid][vVVC1] = 0;
PlayerInfo[playerid][vVVC2] = 0;
return 1;
}
PlayerInfo[playerid][pVeh] = CreateVehicle(carid, -144.9922,1117.5718,19.7500,0.8660,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vLocked] = 1;
PlayerInfo[playerid][vModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vX], PlayerInfo[playerid][vY], PlayerInfo[playerid][vZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vA]);
PlayerInfo[playerid][vC1] = 0;
PlayerInfo[playerid][vC2] = 0;
}
}