CMD:emisora(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid) || GetPlayerState(playerid) != PLAYER_STATE_DRIVER){
return SendClientMessageEx(playerid, COLOR_GRAD2, "Necesitas estar en un vehiculo y ser el conductor.");
}
else if(isnull(params)){
SendClientMessageEx(playerid, COLOR_GRAD2, "{ffff00}Emisoras disponibles:");
SendClientMessageEx(playerid, COLOR_GRAD2, "{ffff00}Emisora 1: {ffffff}Electronica FM");
return 1;
}
new string[84], station[64, randomize;
switch(strval(params)){
case 0:{
format(string, sizeof(string), "%s apaga la radio del vehiculo.",GetPlayerNameEx(playerid));
foreach(Player, i) if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid))
{
StopAudioStreamForPlayer(playerid);
estacionp[i] = 0;
estacionveh[GetPlayerVehicleID(playerid)] = 0;
}
}
case 1:{
format(string, sizeof(string), "%s cambia la emisora a Electronica FM.",GetPlayerNameEx(playerid));
randomize = random(sizeof(Electronica));
estacionveh[GetPlayerVehicleID(playerid)] = 1;
}
default: return SendClientMessageEx(playerid, COLOR_GRAD2, "Estб estaciуn es invбlida.");
}
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
foreach(Player, i) if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid))
{
StopAudioStreamForPlayer(playerid);
estacionp[i] = PlayAudioStreamForPlayer(playerid, station, 1, 1, 1, 1, 0);
}
return 1;
}
new Float:Electronica[2][2] = {
{www.zonaroja.com.nu/radio/sebastian%20ingrosso%20&%20alesso%20feat%20ryan%20tedder%20-%20calling%20(lose%20my%20mind)%20(radio%20edit).mp3},
{www.zonaroja.com.nu/radio/will.i.am%20-%20Scream%20&%20Shout%20ft.%20Britney%20Spears.mp3}
};
(537) : error 001: expected token: ";", but found "."
(539) : error 010: invalid function or declaration
(42720) : error 001: expected token: "]", but found ","
(42733) : warning 204: symbol is assigned a value that is never used: "randomize"
(53328) : warning 203: symbol is never used: "Electronica"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
new string[84], station[64, randomize;
new string[84], station[64], randomize;
Код:
new string[84], station[64, randomize; Код:
new string[84], station[64], randomize; |
(537) : error 001: expected token: ";", but found "." (539) : error 010: invalid function or declaration (42733) : warning 204: symbol is assigned a value that is never used: "randomize" (5332 : warning 203: symbol is never used: "Electronica" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
COMMAND:emisora(playerid, params[]) {
if(sscanf(params, "d", params[0])) return SendClientMessage(playerid, -1, "Escribe: /emisora (1-2)");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Usted no se encuentra en un vehiculo!.");
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "Usted no se encuentra como conductor del vehiculo!.");
if(params[0]==1 || params[0]==2) return SendClientMessage(playerid, -1, "las opciones permitidas son 1 o 2!.");
switch(params[0]){
case 1:{
//LA FUNCION PARA LA OPCION 1
SendClientMessage(playerid, -1, "seleccionaste la opcion 1");
}
case 2:{
//LA FUNCION PARA LA OPCION 2
SendClientMessage(playerid, -1, "seleccionaste la opcion 2");
}
default:{
//LA FUNCION PARA NINGUNA OPCION
SendClientMessage(playerid, -1, "seleccionaste la opcion incorrecta");
}
}
return true;
}
new Electronica[][] = {
{"www.zonaroja.com.nu/radio/sebastian%20ingrosso%20&%20alesso%20feat%20ryan%20tedder%20-%20calling%20(lose%20my%20mind)%20(radio%20edit).mp3"},
{"www.zonaroja.com.nu/radio/will.i.am%20-%20Scream%20&%20Shout%20ft.%20Britney%20Spears.mp3"}
};
main()
{
new Electronica[][] =
{
{"www.zonaroja.com.nu/radio/sebastian%20ingrosso%20&%20alesso%20feat%20ryan%20tedder%20-%20calling%20(lose%20my%20mind)%20(radio%20edit).mp3"},
{"www.zonaroja.com.nu/radio/will.i.am%20-%20Scream%20&%20Shout%20ft.%20Britney%20Spears.mp3"}
};
printf("%s", Electronica[random(2)]);
}