SA-MP Forums Archive
[AJUDA]comando /contar - 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: [AJUDA]comando /contar (/showthread.php?tid=289471)



[AJUDA]comando /contar - atsbs - 11.10.2011

galera fiz um fs, com o comando conta. mais os nimeros ficaram em baixo, entao que queria saber como coloca eles no meio e tb, para quando comeзar a contagen, congelar todos, e quando acaba ele descongelar
aki as linhas do fs
PHP код:
    #include <a_samp>
    #define FILTERSCRIPT
    #if defined FILTERSCRIPT
    #define COLOR_LIGHTBLUE 0x33CCFFAA
    
forward count3();
    
forward count2();
    
forward count1();
    
forward countgo();
    new 
bool:a;
    new 
Float:XFloat:YFloat:Z;
    
#else
    #endif
    ////////////////////////////////////////////////////////////////////////////////
    
public OnPlayerCommandText(playeridcmdtext[])
    {
       if(
strcmp(cmdtext,"/conta",true) == 0) {
       new 
pName[30];
       new 
string[256];
       if (
== false)
       {
       
true;
       
GetPlayerName(playeridpName30);
       
format(string280"*** %s started count."pName);
       
SendClientMessageToAll(COLOR_LIGHTBLUEstring);
       for(new 
iMAX_PLAYERSi++) {
       
GameTextForPlayer(i"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,3);
       
GetPlayerPos(i,X,Y,Z);
       }
       
SetTimer("count3",1000,0);
       
SetTimer("count2",2000,0);
       
SetTimer("count1",3000,0);
       
SetTimer("countgo",3500,0);
    }
       else 
SendClientMessage(playerid0xFF9900AA"Its allready started!");
       return 
1;
       }
       return 
0;
    }
    
////////////////////////////////////////////////////////////////////////////////
    
public count3()
    {
       for(new 
iMAX_PLAYERSi++) {
       
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,3);
       
GetPlayerPos(i,X,Y,Z);
       }
    }
    
////////////////////////////////////////////////////////////////////////////////
    
public count2()
    {
       for(new 
iMAX_PLAYERSi++) {
       
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 2 ~g~-",1000,3);
       
GetPlayerPos(i,X,Y,Z);
       }
    }
    
////////////////////////////////////////////////////////////////////////////////
    
public count1()
    {
       for(new 
iMAX_PLAYERSi++) {
       
GetPlayerPos(i,X,Y,Z);
       
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~]~g~-~g~ 1 ~g~-~y~]~g~-",1000,3);
       
PlayerPlaySound(i,1057,X,Y,Z);
       }
    }
    public 
countgo()
    {
       for(new 
iMAX_PLAYERSi++) {
       
GetPlayerPos(i,X,Y,Z);
       
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~]~g~-~g~ GO GO GO ~g~-~y~]~g~-",1000,3);
       
PlayerPlaySound(i,1057,X,Y,Z);
       }
    } 



Re: [AJUDA]comando /contar - atsbs - 11.10.2011

niguem ?


Re: [AJUDA]comando /contar - ApolloRJ - 11.10.2011

pawn Код:
GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,3);

e sу mudar o final....

1000 e o tempo....


3 e a posiзгo

sу mudar para .. escolhe um... cada um e uma posiзгo...

0 1 2 3 4 5 6

dica O 0 e 5 sгo no meio....


Re: [AJUDA]comando /contar - ViniBorn - 11.10.2011

Mude o ultimo parвmetro do GameTextForPlayer

Aqui estгo os tipos disponнveis. > https://sampwiki.blast.hk/wiki/GameTextStyle


pawn Код:
#include <a_samp>
    #define FILTERSCRIPT
    #if defined FILTERSCRIPT
    #define COLOR_LIGHTBLUE 0x33CCFFAA
    forward count3();
    forward count2();
    forward count1();
    forward countgo();
    new bool:a;
    new Float:X, Float:Y, Float:Z;
    #else
    #endif
    ////////////////////////////////////////////////////////////////////////////////
    public OnPlayerCommandText(playerid, cmdtext[])
    {
       if(strcmp(cmdtext,"/conta",true) == 0) {
       new pName[30];
       new string[256];
       if (a == false)
       {
       a = true;
       GetPlayerName(playerid, pName, 30);
       format(string, 280, "*** %s started count.", pName);
       SendClientMessageToAll(COLOR_LIGHTBLUE, string);
       for(new i; i < MAX_PLAYERS; i++) {
       GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,6);
       GetPlayerPos(i,X,Y,Z);
       }
       SetTimer("count3",1000,0);
       SetTimer("count2",2000,0);
       SetTimer("count1",3000,0);
       SetTimer("countgo",3500,0);

    }
       else SendClientMessage(playerid, 0xFF9900AA, "Its allready started!");
       return 1;
       }

       return 0;
    }
    ////////////////////////////////////////////////////////////////////////////////
    public count3()
    {
       for(new i; i < MAX_PLAYERS; i++) {
       TogglePlayerControllable(playerid,0);
       GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,6);
       GetPlayerPos(i,X,Y,Z);
       }
    }
    ////////////////////////////////////////////////////////////////////////////////
    public count2()
    {
       for(new i; i < MAX_PLAYERS; i++) {
       GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 2 ~g~-",1000,6);
       GetPlayerPos(i,X,Y,Z);
       }
    }
    ////////////////////////////////////////////////////////////////////////////////
    public count1()
    {
       for(new i; i < MAX_PLAYERS; i++) {
       GetPlayerPos(i,X,Y,Z);
       GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~]~g~-~g~ 1 ~g~-~y~]~g~-",1000,6);
       PlayerPlaySound(i,1057,X,Y,Z);
       }
    }
    public countgo()
    {
       for(new i; i < MAX_PLAYERS; i++) {
       TogglePlayerControllable(playerid,1);
       GetPlayerPos(i,X,Y,Z);
       GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~]~g~-~g~ GO GO GO ~g~-~y~]~g~-",1000,6);
       PlayerPlaySound(i,1057,X,Y,Z);
       }
    }



Re: [AJUDA]comando /contar - atsbs - 11.10.2011

sim mais o de congelar, quando comзar a conta
e descongelar quando vai go go go


Re: [AJUDA]comando /contar - ceesar90 - 11.10.2011

Quote:
Originally Posted by atsbs
Посмотреть сообщение
sim mais o de congelar, quando comзar a conta
e descongelar quando vai go go go
https://sampwiki.blast.hk/wiki/Function:...erControllable


Re: [AJUDA]comando /contar - [O.z]Caroline - 11.10.2011

usa meu tutorial que estб em minha assinatura *--*


Re: [AJUDA]comando /contar - Jason_King - 11.10.2011

Sue comando tava quase pronto jб, mas ta ai, congelando e descongelando:

PHP код:
 #include <a_samp>
    #define FILTERSCRIPT
    #if defined FILTERSCRIPT
    #define COLOR_LIGHTBLUE 0x33CCFFAA
    
forward count3();
    
forward count2();
    
forward count1();
    
forward countgo();
    new 
bool:a;
    new 
Float:XFloat:YFloat:Z;
    
#else
    #endif
    ////////////////////////////////////////////////////////////////////////////////
    
public OnPlayerCommandText(playeridcmdtext[])
    {
       if(
strcmp(cmdtext,"/conta",true) == 0) {
       new 
pName[30];
       new 
string[256];
       if (
== false)
       {
       
true;
       
GetPlayerName(playeridpName30);
       
format(string280"*** %s started count."pName);
       
TogglePlayerControllable(i,0);
       
SendClientMessageToAll(COLOR_LIGHTBLUEstring);
       for(new 
iMAX_PLAYERSi++) {
       
GameTextForPlayer(i"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,3);
       
GetPlayerPos(i,X,Y,Z);
       }
       
SetTimer("count3",1000,0);
       
SetTimer("count2",2000,0);
       
SetTimer("count1",3000,0);
       
SetTimer("countgo",3500,0);
    }
       else 
SendClientMessage(playerid0xFF9900AA"Its allready started!");
       return 
1;
       }
       return 
0;
    }
    
////////////////////////////////////////////////////////////////////////////////
    
public count3()
    {
       for(new 
iMAX_PLAYERSi++) {
       
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,3);
       
GetPlayerPos(i,X,Y,Z);
       }
    }
    
////////////////////////////////////////////////////////////////////////////////
    
public count2()
    {
       for(new 
iMAX_PLAYERSi++) {
       
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 2 ~g~-",1000,3);
       
GetPlayerPos(i,X,Y,Z);
       }
    }
    
////////////////////////////////////////////////////////////////////////////////
    
public count1()
    {
       for(new 
iMAX_PLAYERSi++) {
       
GetPlayerPos(i,X,Y,Z);
       
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~]~g~-~g~ 1 ~g~-~y~]~g~-",1000,3);
       
PlayerPlaySound(i,1057,X,Y,Z);
       }
    }
    public 
countgo()
    {
       for(new 
iMAX_PLAYERSi++) {
       
GetPlayerPos(i,X,Y,Z);
       
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~]~g~-~g~ GO GO GO ~g~-~y~]~g~-",1000,3);
       
TogglePlayerControllable(i1);
       
PlayerPlaySound(i,1057,X,Y,Z);
       }
    } 



Re: [AJUDA]comando /contar - atsbs - 11.10.2011

deu esse erro

PHP код:
CONTA.pwn(24) : error 017undefined symbol "i" 
linha

PHP код:
TogglePlayerControllable(i,0); 



Re: [AJUDA]comando /contar - JonathanFeitosa - 11.10.2011

pawn Код:
TogglePlayerControllable(playerid, 0);