SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 27/06/2019, 09:16 AM   #1
zeus99
Little Clucker
 
zeus99's Avatar
 
Join Date: Jun 2019
Location: Hell
Posts: 22
Reputation: 0
Post stream

Hello everyone i need help in stream script

this is play stream for one player

CMD: ppmp3(playerid, params[])
{
//check if the player is a admin
LevelCheck(playerid, 2);
new id, link[256];
if(sscanf(params, "us[256]", id, link)) return SendClientMessage(playerid, -1, "/ppmp3 [PlayerID] [Link]");

StopAudioStreamForPlayer(id);
PlayAudioStreamForPlayer(id, link);
return 1;
}


how to add show dialog for player [Adminstator audio stream]

><><><><

car play

CMD:cmplay(playerid, params[])
{
foreach(Player, i)
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "Usage:: /cmplay [Link]");
if(IsPlayerInAnyVehicle(i))
PlayAudioStreamForPlayer(i, params);
}
return 1;
}


how to play in just one car? /ppmp3 url and play stream just in mycar

><><

or how to playall url stream just in one world?

CMD: playall(playerid, params[])
{
//check if the player is a admin
LevelCheck(playerid, 6);
foreach(Player, i)
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "Usage:: /playall [Link]");
PlayAudioStreamForPlayer(i, params);
}
return 1;
}
zeus99 is offline   Reply With Quote
Old 27/06/2019, 10:28 AM   #2
khRamin78
Huge Clucker
 
Join Date: Jun 2015
Posts: 311
Reputation: 30
Default Re: stream

i hope it will help you

PHP Code:
/*Global*/
#define DIALOG_AUDIOSHOW 1212
new AudioLinks[5][2][] = {
        {
"Name0","Link0"},
        {
"Name1","Link1"},
        {
"Name2","Link2"},
        {
"Name3","Link3"},
        {
"Name4","Link4"}
};

/*Showing Dialog when player type cmd*/
new string[128];

for(new 
i;i<5/*(This is size of Audiolinks);i++*/)
{
    
strcat(string,AudioLinks[i][0]/*This will include olny name*/);
    
strcat(string,"/n");
}
ShowPlayerDialog(playerid,DIALOG_AUDIOSHOW,"Please choose your station:",string,"OK!","QUIT!");

/*When ever a player respone to dialog > public OnDialogResponse*/

if(dialogid == DIALOG_AUDIOSHOW)
{
    if(
response)
    {
        
StopAudioStreamForPlayer(id);
        
PlayAudioStreamForPlayer(idAudioLinks[listitem][1]/*This will give the link!*/);
    }
}


// For your car problem

CMD:cmplay(playeridparams[])
{
    new 
vehicleid;
    
vehicleid GetPlayerVehicleID(playerid);
    foreach(
Playeri)
    {
        if(
isnull(params)) return SendClientMessage(playeridCOLOR_RED"Usage:: /cmplay [Link]");
        if(
IsPlayerInAnyVehicle(i))
        {
            if(
GetPlayerVehicleID(i) = vehicleid)
            {
                
PlayAudioStreamForPlayer(iparams);
            }
        }
        
    }
    return 
1;
}

// For Your VW Problem

CMDplayall(playeridparams[])
{
    
//check if the player is a admin
    
LevelCheck(playerid6);
    new 
vw;
    
vw GetPlayerVirtualWorld(playerid);
    foreach(
Playeri)
    {
        if(
isnull(params)) return SendClientMessage(playeridCOLOR_RED"Usage:: /playall [Link]");
        if(
GetPlayerVirtualWorld(i) == vw)
        {
            
PlayAudioStreamForPlayer(iparams);
        }
        
    }
    return 
1
khRamin78 is offline   Reply With Quote
Old 27/06/2019, 11:40 AM   #3
zeus99
Little Clucker
 
zeus99's Avatar
 
Join Date: Jun 2019
Location: Hell
Posts: 22
Reputation: 0
Default Re: stream

C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\fixes.inc(4904) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\fixes.inc(6105) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\fixes.inc(6105) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\YSI\internal\y_version.inc(2 85) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\textdraws.inc(40) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\textdraws.inc(55) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\textdraws.inc(104) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\textdraws.inc(135) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\serverlock.inc(27) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\zcmd.inc(90) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\dutils.inc(16) : warning 201: redefinition of constant/macro (symbol "MAX_PLAYERS")
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\dutils.inc(26) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\dutils.inc(142) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\dutils.inc(246) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\dutils.inc(303) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\dutils.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\pawno\include\dini.inc(239) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(59) : warning 201: redefinition of constant/macro (symbol "COLOR_ORANGE")
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(60) : warning 201: redefinition of constant/macro (symbol "COLOR_RED")
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(62) : warning 201: redefinition of constant/macro (symbol "COLOR_YELLOW")
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(89) : error 010: invalid function or declaration
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(166) : error 021: symbol already defined: "string"
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(353) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(620) : warning 225: unreachable code
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(697) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(709) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(709) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(709) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(80 : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(929) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(103 : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(110 : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(1140) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(1244) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(1251) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(1343) : error 017: undefined symbol "id"
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(1344) : error 017: undefined symbol "id"
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(1864) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(1942) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(1975) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(2007) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(2042) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(2051) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(2094) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(2280) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3066) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3101) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3146) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3317) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3419) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(342 : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3437) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3454) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3484) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3505) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3530) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3547) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3572) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3581) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3591) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3644) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(3992) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(4002) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(4021) : warning 211: possibly unintended assignment
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(4021) : error 022: must be lvalue (non-constant)
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(4021) : warning 215: expression has no effect
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(4021) : error 001: expected token: ";", but found ")"
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(4021) : error 029: invalid expression, assumed zero
C:\Users\chosa\OneDrive\Desktop\Sufr Freeroam Full Package\filterscripts\gadmin.pwn(4021) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


8 Errors.
zeus99 is offline   Reply With Quote
Old 27/06/2019, 08:18 PM   #4
nbx2000
Big Clucker
 
Join Date: Dec 2016
Posts: 150
Reputation: 5
Default Re: stream

you have already defined some variables. change name variable in conflict
string changed to str2[128] example define id example new id ;
nbx2000 is offline   Reply With Quote
Old 28/06/2019, 07:20 AM   #5
zeus99
Little Clucker
 
zeus99's Avatar
 
Join Date: Jun 2019
Location: Hell
Posts: 22
Reputation: 0
Default Re: stream

bro tnx worked
bun i need to play stream for all players in driver car
and play stream for all players in one vw
zeus99 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which Stream should be used ? skiplovebra Scripting Help 0 25/07/2017 04:52 AM
[Tutorial] Making Stream And Stop Stream Commands dh240473 Tutorials 7 18/09/2015 04:25 PM
Help Stream Objects - Mido Stream Seba97 Help Archive 1 13/08/2011 07:48 AM
Stream Help Anabol Help Archive 2 17/02/2010 11:41 AM


All times are GMT. The time now is 02:22 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.