if(dialogid == RIMSMENU)
{
if ( response )
{
switch ( listitem )
{
case 0:
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not driving a vehicle.");
AddVehicleComponent(GetPlayerVehicleID(playerid),1080);
}
return SendClientMessage(playerid, 0xFFFFFFFF, "You have added Gold Rims to your vehicle.");
}
case 1:
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not driving a vehicle.");
AddVehicleComponent(GetPlayerVehicleID(playerid),1079);
}
return SendClientMessage(playerid, 0xFFFFFFFF, "You have added Cutter Rims to your vehicle.");
}
}
}
CMD:rims(playerid, params[])
{
ShowPlayerDialog(playerid, RIMSMENU, DIALOG_STYLE_LIST, "Rims", "Golden Rims\nCutter Rims", "OK", "CANCEL");
return 1;
}
if(dialogid == RIMSMENU)
{
if ( response )
{
switch ( listitem )
{
case 0:
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not driving a vehicle.");
AddVehicleComponent(GetPlayerVehicleID(playerid),1080);
return SendClientMessage(playerid, 0xFFFFFFFF, "You have added Gold Rims to your vehicle.");
}
case 1:
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not driving a vehicle.");
AddVehicleComponent(GetPlayerVehicleID(playerid),1079);
return SendClientMessage(playerid, 0xFFFFFFFF, "You have added Cutter Rims to your vehicle.");
}
}
}
}
if(dialogid == RIMSMENU) { if ( response ) { switch ( listitem ) { case 0: { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { SendClientMessage(playerid, 0xFFFFFFFF, "You are not driving a vehicle."); } else { AddVehicleComponent(GetPlayerVehicleID(playerid),1080); SendClientMessage(playerid, 0xFFFFFFFF, "You have added Gold Rims to your vehicle."); } } case 1: { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { SendClientMessage(playerid, 0xFFFFFFFF, "You are not driving a vehicle."); } else { AddVehicleComponent(GetPlayerVehicleID(playerid),1079); SendClientMessage(playerid, 0xFFFFFFFF, "You have added Cutter Rims to your vehicle."); } } } } }
error 017: undefined symbol "ProxDetector"
Try this: ... next tine read here about "switch" https://sampwiki.blast.hk/wiki/Control_Structures#switch_2
Код:
if(dialogid == RIMSMENU) { if ( response ) { switch ( listitem ) { case 0: { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { SendClientMessage(playerid, 0xFFFFFFFF, "You are not driving a vehicle."); } else { AddVehicleComponent(GetPlayerVehicleID(playerid),1080); SendClientMessage(playerid, 0xFFFFFFFF, "You have added Gold Rims to your vehicle."); } } case 1: { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) { SendClientMessage(playerid, 0xFFFFFFFF, "You are not driving a vehicle."); } else { AddVehicleComponent(GetPlayerVehicleID(playerid),1079); SendClientMessage(playerid, 0xFFFFFFFF, "You have added Cutter Rims to your vehicle."); } } } } } |
error 017: undefined symbol "ProxDetector"