Jump to content
  • 0

pomoc radio


rhsCZ

Dotaz

zdravim mam takovy problem ze kdyz dam /radioo tak napise ale /radioo 1 uz nefaka

zde je kód

#include 
#include 
new tmp[100];
new animationplayed;
new pawnoweb;
#define PRAVIDLADI  1
#pragma tabsize 0

#include 
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" radio by rhs");
print("--------------------------------------\n");
SendClientMessageToAll(0xFF0000FF, "radio system zapnut");
return 1;

}

public OnFilterScriptExit()
{
new playerid;
StopAudioStreamForPlayer(playerid);
print("\n----------------------------------");
print(" bey");
print("----------------------------------\n");
SendClientMessageToAll(0xFF0000FF, "radio system vypnut");

return 1;

}

public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, 0xF9060D, "zde na serveru je radio-system by rhs napis /rhelp pro prikazy radia");
return 1;
}



public OnPlayerCommandText(playerid, cmdtext[])
{


/*if (strcmp("/hiphop", cmdtext, true, 6) == 0)
{
new name[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
 format(string, sizeof(string),"hráč %s si zapl rádio", name);
 SendClientMessageToAll(0xFF0000, string);
	SendClientMessage(playerid, 0xFF0000, "zapli jsis rádio -> www.hiphopstage.cz");
	PlayAudioStreamForPlayer(playerid, "http://www.hiphopstage.cz/radio.pls");
	return 1; }

	if (strcmp("/evropa2", cmdtext, true, 6) == 0)
{
new name[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
 format(string, sizeof(string),"hráč %s si zapl rádio", name);
 SendClientMessageToAll(0xFF0000, string);
	SendClientMessage(playerid, 0xFF0000, "zapli jsis rádio -> www.evropa2.cz");
	PlayAudioStreamForPlayer(playerid, "http://www.play.cz/radio/evropa2-128.mp3.m3u");
	return 1;
}
*/
if (strcmp("/stopradio", cmdtext, true, 7) == 0)
{
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string), "hráč %s jsi vypl rádio", name);
SendClientMessageToAll(0xFF0000, string);
SendClientMessage(playerid, 0xFF0000, "vypl jsis rádio");
	StopAudioStreamForPlayer(playerid);
	return 1;
}


if(strcmp(cmdtext, "/radioo", true) == 0) {

if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF0000,"Použijte /radio [1-4] a ne jen /radio :D");
return 1;
}
pawnoweb = strval(tmp);
if(pawnoweb < 1 || pawnoweb > 4) { //Tady kolik tech prikazu tam je xD
SendClientMessage(playerid,0xFF0000,"Použijte /radio [1-4] a ne jen /radio :D");
return 1;
}
if(pawnoweb == 1) {
new name[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
 format(string, sizeof(string),"hráč %s si zapl rádio", name);
 SendClientMessageToAll(0xFF0000, string);
	SendClientMessage(playerid, 0xFF0000, "zapli jsis rádio -> www.hiphopstage.cz");
	PlayAudioStreamForPlayer(playerid, "http://www.hiphopstage.cz/radio.pls");
} else if(animationplayed == 2) {
new name[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
 format(string, sizeof(string),"hráč %s si zapl rádio", name);
 SendClientMessageToAll(0xFF0000, string);
	SendClientMessage(playerid, 0xFF0000, "zapli jsis rádio -> www.evropa2.cz");
	PlayAudioStreamForPlayer(playerid, "http://www.play.cz/radio/evropa2-128.mp3.m3u");
}else if(animationplayed == 3) {
//Tady co se stane kdyz da 3
}else if(animationplayed == 4) {
//Tady co se stane kdyz da 4
}
return 1;
}

if (strcmp("/rhelp", cmdtext, true, 5) == 0)
  	{
ShowPlayerDialog(playerid,PRAVIDLADI,DIALOG_STYLE_MSGBOX,"navod k pouziti radia","verze 0.2\nje zde 2. rádio pro 1. radi zapnutí\n/hiphop a vypnutí /stopradio\npro seznam dalsich radii /rmenu\n dekuji za používání rádia\n nezapomente navštivit stranky radia www.hiphopstage.cz","Zavřít","");
return 1;
}
if (strcmp("/rmenu", cmdtext, true, 5) == 0)
{

ShowPlayerDialog(playerid,PRAVIDLADI,DIALOG_STYLE_MSGBOX,"seznam radii","1.hip-hop stage->/hiphop\n2.evropa2->/evropa2","Zavřít","");
  	return 1;
   }
  	return 0;
}

Link to comment
Share on other sites

5 odpovědí na tuto otázku

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...