[AJUDA]Comandos
#1

Olha meu problema e esse.eu fiзo uns comando de comidas e tals que seta life e tals
ate ai tudo certo
quando eu entro no servidor
eu posso digitar qualquer coisas tip /uisadguyafduysadas
aparece la voзe comeu o pastel alquem pode me ajudar?

PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <dini>
#define VPERDA              20 // Valor da quantidade de life que o player irб perder se nгo comer, no caso 20% de life.
#define VMIN                 15 // Define o tempo em minutos que irб lanзar o timer para o player perder o life
#define MAXPLAYERS          500 // Defina a quantidade de slots configurados em seu server.cfg
new SLife[MAXPLAYERS]; //Variбvel salvamento life
new String[64]; // Variбvel global
forward Perder10Life(playerid); //Chamativa da callback
public OnFilterScriptInit()
{
    
Create3DTextLabel("Use:/Cardapio para ver as comidas.",0xFF0000AA ,1507.8744,-1714.6392,14.0469,25,0,50);
    
CreatePickup(1239,1507.8744,-1714.6392,14.0469,94.4999);
    return 
true;
}
public 
OnFilterScriptExit()
{
    for(new 
i=0i<MAXPLAYERSi++)
    {
        
dini_IntSet(String"sLife"SLife[i]);
    }
    return 
true;
}
main()
{
}
public 
OnPlayerConnect(playerid)
{
    
SetTimer("Perder10Life"60000*VMINfalse);
    
SLife[playerid] = dini_Int(String"sLife");
    return 
true;
}
public 
OnPlayerDisconnect(playerid)
{
    
dini_IntSet(String"sLife"SLife[playerid]);
    return 
true;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
     if(
strcmp(cmdtext"/Cardapio"true) == 0)
    {
        if(!
IsPlayerInRangeOfPoint(playerid2.0,1507.8744,-1714.6392,14.0469))
        {
        
SendClientMessage(playerid,0xFF0000AA,"Comidas:");
        
SendClientMessage(playerid,0xFF0000AA,"/Pastel R$20,00,/Coxinha R$20,00,/Enroladinho R$20,00,/Paodequeijo R$15,00,");
        
SendClientMessage(playerid,0xFF0000AA,"/Paodesal R$15,00,/Salgadinho R$15,00,/Bolacha R$15,00");
        
SendClientMessage(playerid,0xFF0000AA,"Frutas:");
        
SendClientMessage(playerid,0xFF0000AA,"/Morango R$25,00,/Pera R$25,00,/Maзa R$25,00,/uva R$25,00.");
        }
         return 
1;
    }
     if(
strcmp(cmdtext"/Pastel"true))
    {
        if(!
IsPlayerInRangeOfPoint(playerid2.01507.8744,-1714.6392,14.0469))
        {
        
GivePlayerMoney(playerid, -20);
        
SendClientMessage(playerid,0xFF0000AA,"Voзe comeu um pastel");
        
SetPlayerHealth(playerid100);
        }
        return 
1;
    }
     if(!
strcmp("/Coxinha"cmdtext,true))
    {
        if(!
IsPlayerInRangeOfPoint(playerid2.01507.8744,-1714.6392,14.0469))
        {
        
GivePlayerMoney(playerid, -20);
        
SendClientMessage(playerid,0xFF0000AA,"Voзe comeu uma coxinha");
        
SetPlayerHealth(playerid100);
        }
        return 
1;
    }
     if(!
strcmp("/Enroladinho"cmdtexttrue))
    {
        if(!
IsPlayerInRangeOfPoint(playerid2.01507.8744,-1714.6392,14.0469))
        {
        
GivePlayerMoney(playerid, -20);
        
SendClientMessage(playerid,0xFF0000AA,"Voзe comeu um enroladinho");
        
SetPlayerHealth(playerid100);
        }
        return 
1;
    } if(!
strcmp("/Paodequeijo"cmdtexttrue))
    {
        if(!
IsPlayerInRangeOfPoint(playerid2.01507.8744,-1714.6392,14.0469))
       {
        
GivePlayerMoney(playerid, -15);
        
SendClientMessage(playerid,0xFF0000AA,"Voзe comeu um pao de queijo");
        
SetPlayerHealth(playerid100);
        }
        return 
1;
    }
     if(!
strcmp("/Paodesal"cmdtexttrue))
    {
        if(!
IsPlayerInRangeOfPoint(playerid2.01507.8744,-1714.6392,14.0469))
        
GivePlayerMoney(playerid, -15);
        
SendClientMessage(playerid,0xFF0000AA,"Voзe comeu um pao de sal");
        
SetPlayerHealth(playerid100);
        return 
1;
    }
     if(!
strcmp("/Salgadinho"cmdtexttrue))
    {
        if(!
IsPlayerInRangeOfPoint(playerid2.01507.8744,-1714.6392,14.0469))
        {
        
GivePlayerMoney(playerid, -15);
        
SendClientMessage(playerid,0xFF0000AA,"Voзe comeu um salgadinho");
        
SetPlayerHealth(playerid100);
        }
        return 
1;
    }
    if(!
strcmp("/Bolacha"cmdtexttrue))
    {
        if(!
IsPlayerInRangeOfPoint(playerid2.01507.8744,-1714.6392,14.0469))
        {
        
GivePlayerMoney(playerid, -15);
        
SendClientMessage(playerid,0xFF0000AA,"Voзe comeu uma bolacha");
        
SetPlayerHealth(playerid100);
        }
        return 
1;
    }
    if(!
strcmp("/Morango"cmdtexttrue))
    {
        if(!
IsPlayerInRangeOfPoint(playerid2.01507.8744,-1714.6392,14.0469))
        {
        
GivePlayerMoney(playerid, -25);
        
SendClientMessage(playerid,0xFF0000AA,"Voзe comeu um morango");
        
SetPlayerHealth(playerid100);
        }
        return 
1;
    }
     if(!
strcmp("/Pera"cmdtexttrue))
    {
        if(!
IsPlayerInRangeOfPoint(playerid2.01507.8744,-1714.6392,14.0469))
        {
        
GivePlayerMoney(playerid, -25);
        
SendClientMessage(playerid,0xFF0000AA,"Voзe comeu uma pera");
        
SetPlayerHealth(playerid100);
        }
        return 
1;
    }
        if(!
strcmp("/Maзa"cmdtexttrue))
    {
        if(!
IsPlayerInRangeOfPoint(playerid2.01507.8744,-1714.6392,14.0469))
        {
        
GivePlayerMoney(playerid, -25);
        
SendClientMessage(playerid,0xFF0000AA,"Voзe comeu uma maзa");
        
SetPlayerHealth(playerid100);
        }
        return 
1;
    }
       if(!
strcmp("/Uva"cmdtexttrue))
    {
        if(!
IsPlayerInRangeOfPoint(playerid2.01507.8744,-1714.6392,14.0469))
        {
        
GivePlayerMoney(playerid, -25);
        
SendClientMessage(playerid,0xFF0000AA,"Voзe comeu uma uma uva");
        
SetPlayerHealth(playerid100);
        }
        return 
1;
    }
    return 
0;
}
public 
Perder10Life(playerid)
{
    new 
Float:Life,Shick[53],Shick1[43];
    
GetPlayerHealth(playeridLife);
    
SetPlayerHealth(playeridLife-VPERDA);
    
format(Shicksizeof(Shick), "Vocк tem que re-abastecer seu estфmago a cada %d min."VMIN);
    
SendClientMessage(playerid0x8B4513FFShick);
    
format(Shicksizeof(Shick), "Vocк perdeu {FF1493}%f{FFA500} de Life."VPERDA);
    
SendClientMessage(playerid0xFFA500FF Shick1);
    return 
true;

ai sempre apareзe voзe comeu o pastel
a cordenada para dar o comando e essa:
PHP код:
1507.8744,-1714.6392,14.0469 
Peзo ajuda deis de Ja Obrigado
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if(strcmp(cmdtext, "/Cardapio", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0,1507.8744,-1714.6392,14.0469))
        {
        SendClientMessage(playerid,0xFF0000AA,"Comidas:");
        SendClientMessage(playerid,0xFF0000AA,"/Pastel R$20,00,/Coxinha R$20,00,/Enroladinho R$20,00,/Paodequeijo R$15,00,");
        SendClientMessage(playerid,0xFF0000AA,"/Paodesal R$15,00,/Salgadinho R$15,00,/Bolacha R$15,00");
        SendClientMessage(playerid,0xFF0000AA,"Frutas:");
        SendClientMessage(playerid,0xFF0000AA,"/Morango R$25,00,/Pera R$25,00,/Maзa R$25,00,/uva R$25,00.");
        return 1;
        }
    return 1;
    }
     if(strcmp(cmdtext, "/Pastel", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1507.8744,-1714.6392,14.0469))
        {
        GivePlayerMoney(playerid, -20);
        SendClientMessage(playerid,0xFF0000AA,"Voзe comeu um pastel");
        SetPlayerHealth(playerid, 100);
        return 1;
        }
    return 1;
    }
     if(!strcmp("/Coxinha", cmdtext,true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1507.8744,-1714.6392,14.0469))
        {
        GivePlayerMoney(playerid, -20);
        SendClientMessage(playerid,0xFF0000AA,"Voзe comeu uma coxinha");
        SetPlayerHealth(playerid, 100);
        return 1;
        }
    return 1;
    }
     if(!strcmp("/Enroladinho", cmdtext, true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1507.8744,-1714.6392,14.0469))
        {
        GivePlayerMoney(playerid, -20);
        SendClientMessage(playerid,0xFF0000AA,"Voзe comeu um enroladinho");
        SetPlayerHealth(playerid, 100);
        return 1;
        }
    return 1;
    } if(!strcmp("/Paodequeijo", cmdtext, true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1507.8744,-1714.6392,14.0469))
       {
        GivePlayerMoney(playerid, -15);
        SendClientMessage(playerid,0xFF0000AA,"Voзe comeu um pao de queijo");
        SetPlayerHealth(playerid, 100);
        return 1;
        }
        return 1;
    }
     if(!strcmp("/Paodesal", cmdtext, true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1507.8744,-1714.6392,14.0469)) return GivePlayerMoney(playerid, -15),SendClientMessage(playerid,0xFF0000AA,"Voзe comeu um pao de sal"),SetPlayerHealth(playerid, 100);
        return 1;
    }
     if(!strcmp("/Salgadinho", cmdtext, true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1507.8744,-1714.6392,14.0469))
        {
        GivePlayerMoney(playerid, -15);
        SendClientMessage(playerid,0xFF0000AA,"Voзe comeu um salgadinho");
        SetPlayerHealth(playerid, 100);
        return 1;
        }
    return 1;
    }
    if(!strcmp("/Bolacha", cmdtext, true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1507.8744,-1714.6392,14.0469))
        {
        GivePlayerMoney(playerid, -15);
        SendClientMessage(playerid,0xFF0000AA,"Voзe comeu uma bolacha");
        SetPlayerHealth(playerid, 100);
        return 1;
        }
    return 1;
    }

    if(!strcmp("/Morango", cmdtext, true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1507.8744,-1714.6392,14.0469))
        {
        GivePlayerMoney(playerid, -25);
        SendClientMessage(playerid,0xFF0000AA,"Voзe comeu um morango");
        SetPlayerHealth(playerid, 100);
        return 1;
        }
    return 1;
    }
     if(!strcmp("/Pera", cmdtext, true))
     {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1507.8744,-1714.6392,14.0469))
        {
        GivePlayerMoney(playerid, -25);
        SendClientMessage(playerid,0xFF0000AA,"Voзe comeu uma pera");
        SetPlayerHealth(playerid, 100);
        return 1;
        }
    return 1;
    }
    if(!strcmp("/Maзa", cmdtext, true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1507.8744,-1714.6392,14.0469))
        {
        GivePlayerMoney(playerid, -25);
        SendClientMessage(playerid,0xFF0000AA,"Voзe comeu uma maзa");
        SetPlayerHealth(playerid, 100);
        }
        return 1;
    }
       if(!strcmp("/Uva", cmdtext, true))
        {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1507.8744,-1714.6392,14.0469))
        {
        GivePlayerMoney(playerid, -25);
        SendClientMessage(playerid,0xFF0000AA,"Voзe comeu uma uma uva");
        SetPlayerHealth(playerid, 100);
        return 1;
        }
    return 1;
    }
    return 0;
}
Tenta assim
#Identa ai.
Reply
#3

deu esses erros

PHP код:
C:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning213tag mismatch
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation
C
:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(148) : warning217loose indentation 
Reply
#4

Sao Apenas Loose Identations,foi onde eu lhe disse para voce Identar...
Como acabar com os Loose Identations.
https://sampforum.blast.hk/showthread.php?tid=271525
Reply
#5

So colocar a #include PSF que some todas as Indendations
Reply
#6

Ou...
pawn Код:
#pragma tabsize 0
No Inicio do GameMode.
Reply
#7

aparece isso
PHP код:
C:\Arquivos de programas\Infernus Pawn by Louco\include\PSF\1.2F3#PSF_LIB\PSF_DPPFI.inc(21) : error: 010: invalid function or declaration
C:\Documents and Settings\weverton\Meus documentos\samp\filterscripts\fome.pwn(21) : warning213tag mismatch 
Reply
#8

Tira a Include PSF e manda a linha que ta dando Tag Mismatch.
Reply
#9

o erros sumiu mais eu chego no lugar corrdenda eu dou /uva e aparece voзe comeu o pastel
sendo que no /uva ta voзe comeu uma uva algum pode me ajudar e resolver isso?
Reply
#10

Obrigado a todos valew pela
caso presisem de min to aki
fimeza vlw
denovo OBrigado
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)