23.07.2011, 18:42
When i will use the cars dialog (the last one ) its works cool but when im using the first one vipguns give me the first 2 cars NRG and sultan but also gives me and the guns i cant figure out what is the problem here.. :/
Here is the code:
Thanks.
Here is the code:
pawn Код:
switch(dialogid)
{
case vipguns:
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
return 1;
}
switch(listitem)
{
case 0:
{
GivePlayerWeapon(playerid, 36, 500);
}
case 1:
{
GivePlayerWeapon(playerid, 26, 500);
}
}
}
case vippc:
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
return 1;
}
TogglePlayerControllable(playerid, 0);
Camera[playerid] = listitem+1;
SetPlayerCamera(playerid);
}
}
switch(vipguns)
{
case vipguns:
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
return 1;
}
switch(listitem)
{
case 0:
{
//NRG-500
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
new id = CreateVehicle(522, x, y, z, -1, 0, 0, -1);
PutPlayerInVehicle(playerid, id, 0);
}
case 1:
{
//sultan
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new id = CreateVehicle(560, x, y, z, -1, -1, -1, -1);
PutPlayerInVehicle(playerid, id, 0);
}
case 2:
{
//infernus
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
new id = CreateVehicle(411, x, y, z, -1, -1, -1, -1);
PutPlayerInVehicle(playerid, id, 0);
}
case 3:
{
//turisimo
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
new id = CreateVehicle(451, x, y, z, -1, -1, -1, -1);
PutPlayerInVehicle(playerid, id, 0);
}
case 4:
{
//Sabre
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
new id = CreateVehicle(475, x, y, z, -1, -1, -1, -1);
PutPlayerInVehicle(playerid, id, 0);
}
case 5:
{
//comet
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
new id = CreateVehicle(480, x, y, z, -1, -1, -1, -1);
PutPlayerInVehicle(playerid, id, 0);
}
case 6:
{
//Bullet
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
new id = CreateVehicle(541, x, y, z, -1, -1, -1, -1);
PutPlayerInVehicle(playerid, id, 0);
}
case 7:
{
//Jester
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
new id = CreateVehicle(559, x, y, z, -1, -1, -1, -1);
PutPlayerInVehicle(playerid, id, 0);
}
case 8:
{
//Elegy
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
new id = CreateVehicle(562, x, y, z, -1, -1, -1, -1);
PutPlayerInVehicle(playerid, id, 0);
}
case 9:
{
//Super GT
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
new id = CreateVehicle(506, x, y, z, -1, -1, -1, -1);
PutPlayerInVehicle(playerid, id, 0);
}
}
}
}
return 1;
}