27.12.2011, 21:24
Im using a CB Radio, which can be found here: https://sampforum.blast.hk/showthread.php?tid=267123. I assigned different CB Radio's for different classes. For example Trucker class to have Channel 1, Bus Driver class to have channel 2, and so on. However I need a switch in order to make this work because I get this error: invalid statement; not in switch.
Код:
public OnPlayerSpawn(playerid) { case ClassTruckDriver: { pChannel[playerid] = 1; } case ClassBusDriver: { pChannel[playerid] = 2; } case ClassPilot: { pChannel[playerid] = 3; } case ClassPolice: { pChannel[playerid] = 4; } case ClassMafia: { pChannel[playerid] = 5; } case ClassCourier: { pChannel[playerid] = 6; } case ClassAssistance: { pChannel[playerid] = 7; } case ClassRoadWorker: { pChannel[playerid] = 8; } return 1; }