15.08.2012, 09:52
Hey, I haven't scripted for a very long time and I finally found a few radio stations that will work with sa-mp that I like and enjoy listening to... I have made the command fine and all that's working. But I forgot how to make it so that if you're not listening to the radio and you type /stopradio it turns around and tells you that your not listening to the radio, but if you are it carry's on with the command.
PS: Been over a year since I have scripted therefore I am a complete newbie once again... :P
Код:
COMMAND:radio(playerid,cmdtext) { new islisteningtoradio[MAX_PLAYERS]; if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You have to be in a vehicle to perform this command!"); { ShowPlayerDialog(playerid,90,DIALOG_STYLE_LIST,"Radio Stations:","1. HotJamz\r\n2. TheBeat\r\n3. PowerHitz\r\n4. Hit104\r\n5. More will be added soon!","Listen","Cancel"); islisteningtoradio[playerid] = 1; } return 1; } COMMAND:stopradi(playerid,cmdtext) { new islisteningtoradio[MAX_PLAYERS]; if(!islisteningtoradio[playerid] == 1); { } else { SendClientMessage(playerid, COLOR_RED, "You're already listening to the radio!"); ] return 1; }
Код:
F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1054) : warning 213: tag mismatch F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1054) : error 036: empty statement F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1057) : error 029: invalid expression, assumed zero F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1060) : warning 217: loose indentation F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1060) : error 029: invalid expression, assumed zero F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1060 -- 1061) : warning 215: expression has no effect F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1061) : error 001: expected token: ";", but found "return" F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1064) : warning 225: unreachable code F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1064) : warning 217: loose indentation F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1064) : error 029: invalid expression, assumed zero F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1064) : error 017: undefined symbol "cmd_drift1" F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1064) : error 029: invalid expression, assumed zero F:\Games\SA-MP\Dv drift\Dv drift\gamemodes\dvdrift.pwn(1064) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.