24.04.2013, 07:21
I have a radio filterscript, and i want to made it only for premium (donation ranks)
But when i type anything in-game it says that message, "Nu esti VIP. Pentru a cumpara www.exaid-gaming.tk !" - i set this message to send when you don't have a donate rank and you type /muzica (/music), but it appears even if i type /exit from a house. Even with rcon login.
PLEASE help me
Код:
//////////////////////////////////////////////////////////////////////////////// //*Script is made By FiReMaNStone //----------------------------------Include files------------------------------- #include <a_samp> #include <a_players> #pragma tabsize 0 enum pInfo { pDonateRank }; new PlayerInfo[MAX_PLAYERS][pInfo]; #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Radio system is starting.."); print(" Radio system has started."); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { print("\n--------------------------------------"); print(" Radio System has been shut down due to a Filterscript unload/Exit."); print("--------------------------------------\n") return 1; } #else main() { print("\n----------------------------------"); print(" Radio System by FiReMaNStone. Powered by FiReMaNStone"); print("----------------------------------\n"); } #endif public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/muzica", cmdtext, true, 10) == 0) //Change this one to whatever you want. { if (PlayerInfo[playerid][pDonateRank]<1) { SendClientMessage(playerid, 0x99FF00, " Nu esti VIP. Pentru a cumpara www.exaid-gaming.tk !"); return 1; } ShowPlayerDialog(playerid,90,DIALOG_STYLE_LIST,"Posturi Disponibile","1. Kiss FM\r\n2. Radio ZU\r\n3. Radio Taraf","Select", "Cancel"); return 1; } if (strcmp("/stopradio", cmdtext, true, 10) == 0) { StopAudioStreamForPlayer(playerid);//This is the function we need to stop the audio from streaming the music. return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case 90: //Remember the ID we changed in ShowPlayerDialog? (90) That's how the DialogResponse will get to know which Dialog it's going to use. { if(!response)// This one is used for option 2 which we changed to (Cancel). { SendClientMessage(playerid, 0x42F3F198, "Ai anulat radio.");//This one sends a message when you close the dialog using (Cancel). return 1; } switch(listitem)//This one will list the items. { case 0://Case 0 is basically the first line we made in ShowPlayerDialog (1.) { PlayAudioStreamForPlayer(playerid, "http://www.kissfm.ro/live/");//This function will play our desired radio. So we have to put the url between its brackets. SendClientMessage(playerid, 0x42F3F198, "Scrie /stopradio pentru a opri radio-ul."); //This line sends a message to the listener that he can stop it using /stopradio. } case 1://Case 1 is the second line we put in ShowPlayerDialog (\r\n2.) { PlayAudioStreamForPlayer(playerid, "http://live.radiozu.ro/");//This function will play our desired radio. So we have to put the url between its brackets. SendClientMessage(playerid, 0x42F3F198, "Scrie /stopradio pentru a opri radio-ul.");//This line sends a message to the listener that he can stop it using /stopradio. } case 2://Case 2 is the third line we put in ShowPlayerDialog(\r\n3.) { PlayAudioStreamForPlayer(playerid, "http://www.radiotraditional.ro/asculta-live/asculta-online-manele");//This function will play our desired radio. So we have to put the url between its brackets. SendClientMessage(playerid, 0x42F3F198, "Scrie /stopradio pentru a opri radio-ul.");//This line sends a message to the listener that he can stop it using /stopradio. } //You can continue cases here but make sure you make a new line in the ShowPlayerDialog on /myradio command \r\n4. 4th \r\n5. 5th channel etc.. } } } return 1; }
PLEASE help me