Help +rep error invalid expression
#1

CMDtream(playerid,params[])
{
if(IsPlayerVipType(playerid,2))
{
new url[200];
if(sscanf(params,"s[200]", url)) return SendClientMessage(playerid, 0x9C9C9CAA, "Syntax: /stream [url]");
foreach(new i: Player)
{
PlayAudioStreamForPlayer(i, url);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has stream the music [%s]",pName, url);
SendClientMessageToAll(-1, "Use /shh to stop the music");
}
else SendClientMessage(playerid, COLOR_RED, "ERROR: You not is a Silver or Gold Member!");
}
return 1;
}
Reply
#2

PHP код:
CMD:stream(playerid,params[])
{
if(
IsPlayerVipType(playerid,2))
{
new 
url[200];
if(
sscanf(params,"s[200]"url)) return SendClientMessage(playerid0x9C9C9CAA"Syntax: /stream [url]");
foreach(new 
iPlayer)
{
PlayAudioStreamForPlayer(iurl);
new 
string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has stream the music [%s]",pNameurl);
SendClientMessageToAll(-1"Use /shh to stop the music");
}
} else return 
SendClientMessage(playeridCOLOR_RED"ERROR: You not is a Silver or Gold Member!");
return 
1;

Try This
Reply
#3

Alignment should be this
pawn Код:
CMD:stream(playerid,params[])
{
    if(IsPlayerVipType(playerid,2))
    {
         new url[200];
         if(sscanf(params,"s[200]", url)) return SendClientMessage(playerid, 0x9C9C9CAA, "Syntax: /stream [url]");
         foreach(new i: Player)
         {
              PlayAudioStreamForPlayer(i, url);
              new string[64], pName[MAX_PLAYER_NAME];
              GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
              format(string,sizeof string,"%s has stream the music [%s]",pName, url);
              SendClientMessageToAll(-1, "Use /shh to stop the music");
          }
     } else return SendClientMessage(playerid, COLOR_RED, "ERROR: You not is a Silver or Gold Member!");

return 1;
}
Reply
#4

this is exactly what i posted
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)