11.10.2013, 04:28
pawn Код:
CMD:veh(playerid)
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, VERMELHO,"ERRO: Vocк nгo tem permissгo para usar este comando.");
if(carro[playerid] == 0)
{
ShowPlayerDialog(playerid, DIALOG_VEH, DIALOG_STYLE_LIST, "Carros", "Sultan \nInfernus \nФnibus 1 \nBMX \nMountain Bike \nФnibus 2 \nFaggio \nSanchez \nQuad \nPacker \nCamper \nVortex \nNRG-500", "Criar", "Cancelar");
}
else
SendClientMessage(playerid, VERMELHO,"ERRO: Vocк nгo pode criar mas que um veнculo, use (/dcm).");
return 1;
}
pawn Код:
if(dialogid == DIALOG_VEH)
{
if(response)
{
if(listitem == 0) // Sultan
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(560, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
if(listitem == 1) // Infernus
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(411, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
if(listitem == 2) // Фnibus 1
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(437, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
if(listitem == 3) // BMX
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(481, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
if(listitem == 4) // MOUNTAIN BIKE
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(510, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
if(listitem == 5) // ФNIBUS 2
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(431, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
if(listitem == 6) // FAGGIO
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(462, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
if(listitem == 7) // SANCHEZ
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(468, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
if(listitem == 8) // QUAD
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(471, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
if(listitem == 9) // PACKER
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(443, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
if(listitem == 10) // CAMPER
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(483, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
if(listitem == 11) // VORTEX
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(539, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
if(listitem == 12) // NRG-500
{
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateVehicle(522, X+5, Y, Z+1, Angle, random(100), random(100), -1);
carro[playerid] = 1;
}
}
}