SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 21/02/2014, 05:42 PM   #1
zDbruno
Big Clucker
 
zDbruno's Avatar
 
Join Date: Jan 2014
Posts: 122
Reputation: 0
Post que ha de errado com o cmd

esse erro no codego me ajuda
PHP Code:
//==============================================================================
#include <a_samp>
//==============================================================================
forward Funciona(playerid);
public 
Funciona(playerid);
//==============================================================================
public OnFilterScriptInit()
{
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/ligarsom"cmdtexttrue) == 0)
    {
    new 
NaoFloda[MAX_PLAYERS];
    new 
Float:XFloat:YFloat:ZFloat:Distancia 30.0;
    if(
NaoFloda[playerid] == 0)
    {
           if(
IsPlayerInRangeOfPoint(playeridDistanciaXYZ))
        {
            
GetPlayerPos(playeridXYZ);
            
NaoFloda[playerid] = 1;
            
PlayAudioStreamForPlayer(playerid"https://www.dropbox.com/s/inhjvoxw6h1ht05/Basshunter%20-%20Now%20your%20gone.mp3"XYZDistancia1);
        }
        return 
true;
    }
    if (
strcmp("/deslisom"cmdtexttrue) == 0)
    {
           if(!
IsPlayerInRangeOfPoint(playeridDistanciaXYZ))
        {
             
NaoFloda[playerid] = 0;
             
StopAudioStreamForPlayer(playerid);
        }
        return 
true;
    }
    return 
true;

e aqui o erro
PHP Code:
C:\Users\bruno\Desktop\novos server\tudo da [zD]\zD-com objetos\filterscripts\RadioPerto.pwn(47) : error 030compound statement not closed at the end of file (started at line 21)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


1 Error

zDbruno is offline   Reply With Quote
Old 21/02/2014, 05:45 PM   #2
ViniBorn
Godfather
 
ViniBorn's Avatar
 
Join Date: Aug 2010
Location: Brasília
Posts: 5,313
Reputation: 720
Default Re: ajuda q ha de errado

Retira isso
pawn Code:
forward Funciona(playerid);
public Funciona(playerid);
__________________



CONTATO: F A C E B O O K: @vinibornpawn

ViniBorn is offline   Reply With Quote
Old 21/02/2014, 05:48 PM   #3
zDbruno
Big Clucker
 
zDbruno's Avatar
 
Join Date: Jan 2014
Posts: 122
Reputation: 0
Default Re: ajuda q ha de errado

Quote:
Originally Posted by ViniBorn View Post
Retira isso
pawn Code:
forward Funciona(playerid);
public Funciona(playerid);
retirei e deu isso

PHP Code:
C:\Users\bruno\Desktop\novos server\tudo da [zD]\zD-com objetos\filterscripts\RadioPerto.pwn(44) : error 030compound statement not closed at the end of file (started at line 18)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


1 Error

zDbruno is offline   Reply With Quote
Old 21/02/2014, 06:00 PM   #4
zDbruno
Big Clucker
 
zDbruno's Avatar
 
Join Date: Jan 2014
Posts: 122
Reputation: 0
Default Re: ajuda que ha de errado com o cmd

alguem ai ajuda
zDbruno is offline   Reply With Quote
Old 21/02/2014, 06:01 PM   #5
CharlieBrown
Huge Clucker
 
CharlieBrown's Avatar
 
Join Date: Sep 2013
Location: Curitiba/PR
Posts: 211
Reputation: 5
Default Re: ajuda que ha de errado com o cmd

pawn Code:
#include <a_samp>

public OnFilterScriptInit() {
    return true;
}
public OnFilterScriptExit() {
    return true;
}
public OnPlayerConnect(playerid) {
    return true;
}
new NaoFloda[MAX_PLAYERS];
new Float:X, Float:Y, Float:Z;
public OnPlayerCommandText(playerid, cmdtext[]) {
    if(!strcmp(cmdtext, "/ligarsom", true)) {
        if(NaoFloda[playerid] == 0) {
            if(IsPlayerInRangeOfPoint(playerid, 30.0, X, Y, Z)) {
                GetPlayerPos(playerid, X, Y, Z);
                NaoFloda[playerid] = 1;
                PlayAudioStreamForPlayer(playerid, "https://www.dropbox.com/s/inhjvoxw6h1ht05/Basshunter%20-%20Now%20your%20gone.mp3", X, Y, Z, 30.0, 1);
            }
        }
        return true;
    }
    if(!strcmp(cmdtext, "/desligarsom", true)) {
        if(!IsPlayerInRangeOfPoint(playerid, 30.0, X, Y, Z)) {
             NaoFloda[playerid] = 0;
             StopAudioStreamForPlayer(playerid);
        }
        return true;
    }
    return false;
}
__________________
CharlieBrown is offline   Reply With Quote
Old 21/02/2014, 06:07 PM   #6
zDbruno
Big Clucker
 
zDbruno's Avatar
 
Join Date: Jan 2014
Posts: 122
Reputation: 0
Unhappy Re: ajuda que ha de errado com o cmd

Quote:
Originally Posted by CharlieBrown View Post
pawn Code:
#include <a_samp>

public OnFilterScriptInit() {
    return true;
}
public OnFilterScriptExit() {
    return true;
}
public OnPlayerConnect(playerid) {
    return true;
}
new NaoFloda[MAX_PLAYERS];
new Float:X, Float:Y, Float:Z;
public OnPlayerCommandText(playerid, cmdtext[]) {
    if(!strcmp(cmdtext, "/ligarsom", true)) {
        if(NaoFloda[playerid] == 0) {
            if(IsPlayerInRangeOfPoint(playerid, 30.0, X, Y, Z)) {
                GetPlayerPos(playerid, X, Y, Z);
                NaoFloda[playerid] = 1;
                PlayAudioStreamForPlayer(playerid, "https://www.dropbox.com/s/inhjvoxw6h1ht05/Basshunter%20-%20Now%20your%20gone.mp3", X, Y, Z, 30.0, 1);
            }
        }
        return true;
    }
    if(!strcmp(cmdtext, "/desligarsom", true)) {
        if(!IsPlayerInRangeOfPoint(playerid, 30.0, X, Y, Z)) {
             NaoFloda[playerid] = 0;
             StopAudioStreamForPlayer(playerid);
        }
        return true;
    }
    return false;
}
esse foi mais no jogo nao vai digito /ligarsom e nao toca nd
zDbruno is offline   Reply With Quote
Old 21/02/2014, 06:12 PM   #7
CharlieBrown
Huge Clucker
 
CharlieBrown's Avatar
 
Join Date: Sep 2013
Location: Curitiba/PR
Posts: 211
Reputation: 5
Default Re: ajuda que ha de errado com o cmd

Quote:
Originally Posted by zDbruno View Post
esse foi mais no jogo nao vai digito /ligarsom e nao toca nd
Eu ia tem mandar link para você estudar mais isso não iria adiantar nada.
Então toma codigo pronto.
pawn Code:
#include <a_samp>

public OnFilterScriptInit() {
    return true;
}
public OnFilterScriptExit() {
    return true;
}
public OnPlayerConnect(playerid) {
    return true;
}
new NaoFloda[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[]) {

    if(!strcmp(cmdtext, "/ligarsom", true)) {
        new Float:X, Float:Y, Float:Z;
        if(NaoFloda[playerid] == 0) {
            for(new i = 0; i < MAX_PLAYERS; i++) {
                GetPlayerPos(playerid, X, Y, Z);
                if(IsPlayerInRangeOfPoint(i, 30.0, X, Y, Z)) {
                NaoFloda[playerid] = 1;
                PlayAudioStreamForPlayer(i, "https://www.dropbox.com/s/inhjvoxw6h1ht05/Basshunter%20-%20Now%20your%20gone.mp3", X, Y, Z, 30.0, 1);
                }
            }
        }
        return true;
    }
    if(!strcmp(cmdtext, "/desligarsom", true)) {
        new Float:X, Float:Y, Float:Z;
        for(new i = 0; i < MAX_PLAYERS; i++) {
            GetPlayerPos(playerid, X, Y, Z);
            if(!IsPlayerInRangeOfPoint(i, 30.0, X, Y, Z)) {
                NaoFloda[playerid] = 0;
                StopAudioStreamForPlayer(i);
            }
        }
        return true;
        }
    return false;
}
__________________
CharlieBrown 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
[Ajuda] Objetos não aparecendo, teleportando pro lugar errado e nome errado. LucaAllexandre Português/Portuguese 9 24/07/2013 05:07 PM
[Ajuda] O Que Tá Errado? sanalex Português/Portuguese 11 01/06/2012 10:24 PM
[Ajuda] O Que Tá Errado? sanalex Português/Portuguese 22 14/05/2012 01:45 PM
[AJUDA] o que tem de errado com o GM? timebomb17 Português/Portuguese 28 22/02/2012 05:18 PM
[ajuda] Oq Ta De Errado? Don_Speed Português/Portuguese 5 21/02/2012 09:56 PM


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


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