23.07.2011, 19:36
Oh my bad, sorry.
Try this:
Add "vipcars" as another define for your ShowPlayerDialog(...vipcars...)
You switched "vipguns" twice in your code. and had some weird indentation.
Try this:
Add "vipcars" as another define for your ShowPlayerDialog(...vipcars...)
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
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;
} else {
TogglePlayerControllable(playerid, 0);
Camera[playerid] = listitem+1;
SetPlayerCamera(playerid);
}
}
case vipcars:
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
return 1;
}
switch(listitem)
{
case 0:
{
//NRG-500
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, 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, x, y, 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, x, y, 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, x, y, 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, x, y, 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, x, y, 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, x, y, 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, x, y, 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, x, y, z);
new id = CreateVehicle(506, x, y, z, -1, -1, -1, -1);
PutPlayerInVehicle(playerid, id, 0);
}
}
}
}
return 1;
}