[Ajuda] TextDraw Prisгo
#1

Olб povo...

Como faзo para quando o player for preso criar um textdraw em cima do mapa com o tempo ? Preso %d/%d
Reply
#2

Ano passado quando eu dei um tempo de programar meu gamemode, eu criei este sistema ta deste jeito.

Bora lб

pawn Код:
// = = =  Topo do GM = = = //
new
    ContPreso [ MAX_PLAYERS ]
;
new
    TempContPreso [ MAX_PLAYERS ]
;
Depois no Topo dnv

pawn Код:
forward xConttPreso ( playerid ) ; public xConttPreso ( playerid )
{
    new
        xCelulas [ 70 ] ;
    format ( xCelulas, sizeof ( xCelulas ), "~w~Preso por:~n~~r~%d Segundos.", ContPreso [ playerid ] ) ;
    GameTextForPlayer ( playerid, string, 1500, 3 ) ;
   
    if ( ContPreso [ playerid ] == 0 )
    {
        KillTimer( TempContPreso [ playerid ] ) ;

    }
    ContPreso [ playerid ] -- ;
}
Depois vocк vai no seu comando de prender e coloca

PHP код:
TempContPreso playerid ] = SetTimerEx "xConttPreso"10001"i"playerid ) ;
ContPreso playerid ] = VariavelDoTempoDePrisao 60 
VariavelDoTempoDePrisao // Isto й a sua variavel do seu tempo

Quando acabar o tempo vocк coloca
pawn Код:
KillTimer ( TempContPreso) ;
PS: No caso o meu nгo й TextDraw

Finalizando ficara assim:


Reply
#3

Nгo deu certo...

- Tive que tirar uma linha senгo tava dando erro que nгo conseguia arrumar.

pawn Код:
if(strfind(text, "pica", true) != -1 || strfind(text, "fdp", true) != -1 || strfind(text, "f.d.p", true) != -1 || strfind(text, "f.dp", true) != -1 || strfind(text, "f.dp", true) != -1 || strfind(text, "Vtnc", true) != -1 || strfind(text, "Vai toma no cu", true) != -1 || strfind(text, "FDP", true) != -1 || strfind(text, "Adm Noob", true) != -1 || strfind(text, "FDP", true) != -1 || strfind(text, "Server Lixo", true) != -1 || strfind(text, "Filho da puta", true) != -1)
{
    new string[256];
    new pname[MAX_PLAYER_NAME];
    SendClientMessage(playerid,Vermelho,"{0099FF}|Player|{CCCCFF} Vocк foi avisado por chingar");
    SendClientMessage(playerid,Vermelho,"{0099FF}|Player|{CCCCFF} Ao receber 5 avisos vocк serб preso por 12 Minutos");
    format(string, sizeof(string), "{0099FF}|BLC Admin|{CCCCFF} O Adminstrador [L.M]Guardiao Avisou o jogador %s ( Motivo: Chingamento )(%d/5)" ,PlayerName(playerid),aviso[playerid]);
    SendClientMessageToAll(Vermelho, string);
    aviso[playerid]+=1;
    if(aviso[playerid] >= 5) {
        format(string, sizeof(string), "|BLC Admin| O Administrador [L.M]Guardiao Prendeu o jogador %s por 12 minutos ( Motivo: Chingamentos 5/5 )",pname);
        SendClientMessageToAll(Amarelo, string);
        SetPlayerPos(playerid, 263.8820,77.4002,1001.0391);
        SetPlayerInterior(playerid, 6);
        SetPlayerHealth(playerid, 99999);
        ResetPlayerWeapons(playerid);
        format(file2, sizeof(file2), PASTA_CONTAS, pname);
        dini_IntSet(file2, "Preso", 1);
        //SetTimerEx("SairCadeia", 720000, false, "i", playerid);
        TempContPreso [ playerid ] = SetTimerEx ( "xConttPreso", 1000, 1, "i", playerid ) ;
//      ContPreso [ playerid ] = SairCadeia * 60 ;
    }
}
A Linha й:

Quote:

ContPreso [ playerid ] = SairCadeia * 60 ;

e o erro:

Quote:

syntax error in the expression, or invalid function call.

E tem isso tambйm

pawn Код:
forward SairCadeia(playerid);


public SairCadeia(playerid) {
      new file2[100];
      format(file2, sizeof(file2), P_CONTAS, pname);
      dini_IntSet(file2, "Preso", 0);
      aviso[playerid] = 0;
      SpawnPlayer(playerid);
      return 1;
}
Reply
#4

UP UP '='
Reply
#5

Tenta

PHP код:
if ( strfind(text"pica"true) != -|| strfind(text"fdp"true) != -|| strfind(text"f.d.p"true) != -|| strfind(text"f.dp"true) != -|| strfind(text"f.dp"true) != -|| strfind(text"Vtnc"true) != -|| strfind(text"Vai toma no cu"true) != -|| strfind(text"FDP"true) != -|| strfind(text"Adm Noob"true) != -|| strfind(text"FDP"true) != -|| strfind(text"Server Lixo"true) != -|| strfind(text"Filho da puta"true) != -1)
{
    static
        
string 256 ],
        
pname 24 ]
    ;
    
SendClientMessage playerid,Vermelho,"{0099FF}|Player|{CCCCFF} Vocк foi avisado por chingar");
    
SendClientMessage playerid,Vermelho,"{0099FF}|Player|{CCCCFF} Ao receber 5 avisos vocк serб preso por 12 Minutos");
    
format stringsizeof ( string ), "{0099FF}|BLC Admin|{CCCCFF} O Adminstrador [L.M]Guardiao Avisou o jogador %s ( Motivo: Chingamento )(%d/5)" ,PlayerName(playerid),aviso[playerid]);
    
SendClientMessageToAll Vermelhostring ) ;
    
aviso playerid ] + = ;
    if ( 
aviso playerid ] >= )
    {
        
format stringsizeof ( string ), "|BLC Admin| O Administrador [L.M]Guardiao Prendeu o jogador %s por 12 minutos ( Motivo: Chingamentos 5/5 )",pname);
        
SendClientMessageToAll Amarelostring ) ;
        
SetPlayerPos playerid263.8820,77.4002,1001.0391 ) ;
        
SetPlayerInterior playerid) ;
        
SetPlayerHealth playerid99999 ) ;
        
ResetPlayerWeapons playerid ) ;
        
format file2sizeof file2 ), PASTA_CONTASpname ) ;
        
dini_IntSet file2"Preso") ;
        
TempContPreso playerid ] = SetTimerEx "xConttPreso"10001"i"playerid ) ;
        
ContPreso playerid ] = 720000 ;
    }

Reply
#6

Nгo aparece o GameTextForPlayer na prisгo
Reply
#7

UP UP *-*
Reply
#8

Se colocou esta callback?

PHP код:
forward xConttPreso playerid ) ; public xConttPreso playerid )
{
    new
        
xCelulas 70 ] ;
    
format xCelulassizeof xCelulas ), "~w~Preso por:~n~~r~%d Segundos."ContPreso playerid ] ) ;
    
GameTextForPlayer playeridstring1500) ;
    
    if ( 
ContPreso playerid ] == )
    {
        
KillTimerTempContPreso playerid ] ) ;

    }
    
ContPreso playerid ] -- ;

Reply
#9

Tem sim, ela estб no topo.

pawn Код:
forward xConttPreso ( playerid ) ; public xConttPreso ( playerid )
{
    new xCelulas[70] ;
    new string[128];
    format(xCelulas,sizeof(xCelulas), "~w~Preso por:~n~~r~%d Segundos.",ContPreso[ playerid ] ) ;
    GameTextForPlayer ( playerid, string, 90000, 3 ) ;

    if ( ContPreso [ playerid ] == 0 )
    {
        KillTimer( TempContPreso [ playerid ] ) ;

    }
    ContPreso [ playerid ] -- ;
}
Reply
#10

Ainda nгo consegui, Smir Ajuda?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)