Problema com Stock - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: Problema com Stock (
/showthread.php?tid=635615)
Problema com Stock -
NATANGameron - 10.06.2017
To criando essa stock e nгo vai da erro.
Erros:
Код:
C:\Users\Natan\Desktop\Servidor\gamemodes\GM.pwn(27186) : error 029: invalid expression, assumed zero
C:\Users\Natan\Desktop\Servidor\gamemodes\GM.pwn(27186) : error 012: invalid function call, not a valid address
C:\Users\Natan\Desktop\Servidor\gamemodes\GM.pwn(27186) : warning 215: expression has no effect
C:\Users\Natan\Desktop\Servidor\gamemodes\GM.pwn(27186) : error 001: expected token: ";", but found ")"
C:\Users\Natan\Desktop\Servidor\gamemodes\GM.pwn(27186) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Stock:
PHP код:
stock recebermusicayt
{
for(new i = 0; i <MAX_PLAYERS; i++){
if(IsPlayerInRangeOfPoint(i,10.0,Pos[0],Pos[1],Pos[2])){
PlayAudioStreamForPlayer(i,cmdString);
}
}
}
To criando essa stock pra colocar dentro de um dialog o dialog tem uma funзгo chamada cmdstring ai o cara digita no input o link a funзгo geta ele e outra funзгo vai geta do stock esse link.
Re: Problema com Stock -
NATANGameron - 10.06.2017
Quero tipo que essa stock:
PHP код:
public ReceberSomVeiculo(playerid)
{
EnviarSomVeiculo(playerid);
new Float:X, Float:Y, Float:Z;
GetVehiclePos(SomCarid[playerid], X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, 15.0, X, Y, Z))
{
if(Musica[playerid] == 1)
{
if(vMusica[playerid] == 0)
{
new cmdString[128];
format(cmdString, sizeof(cmdString), "http://www.*******inmp3.com/fetch/?video=%s", recebermusicayt);
for(new i = 0; i <MAX_PLAYERS; i++){
PlayAudioStreamForPlayer(i,cmdString);// URL 1
vMusica[playerid] = 1;
}
}
}
if(Musica[playerid] == 2)
{
if(vMusica[playerid] == 0)
{
for(new i = 0; i <MAX_PLAYERS; i++){
PlayAudioStreamForPlayer(i,recebermusicayt);// URL 2
vMusica[playerid] = 1;
}
}
}
}else{
if(vMusica[playerid] == 1)
{
StopAudioStreamForPlayer(playerid);
Musica[playerid] = 0;
vMusica[playerid] = 0;
}
}
}
aquele format(cmdString, sizeof(cmdString), "http://www.*******inmp3.com/fetch/?video=%s", recebermusicayt);
de uma stock receba o recebermusicayt disso:
PHP код:
recebermusicayt[playerid] = strval(inputtext);
que fica em uma dialog
Re: Problema com Stock -
DelK - 10.06.2017
PHP код:
stock recebermusicayt(playerid)
{
for(new i = 0; i <MAX_PLAYERS; i++){
if(IsPlayerInRangeOfPoint(i,10.0,Pos[0],Pos[1],Pos[2])){
PlayAudioStreamForPlayer(i,cmdString);
}
}
}
Re: Problema com Stock -
NATANGameron - 10.06.2017
Nгo deu
Re: Problema com Stock -
NATANGameron - 10.06.2017
Tipo a stock receber o inputtext de um dialog.