Recompensas por Escribir una frase.
#1

Lo que pasa es que estoy tratando de instalar un sistema de ejemplo:

"El primero en escribir KJAS9das8zxl ganara 29000$ y 5 Score"..

Y Sale el mensaje y todo pero al escribir la frase no me da ni el dinero ni el Score...

Aquн estбn las lineas, a ver si alguien me dice que esta mal..


Primero tenemos el new:

PHP код:
new
        
xCharacters[][] =
        {
            
"A""B""C""D""E""F""G""H""*""J""K""L""M",
                
"N""O""P""Q""R""S""T""U""V""W""X""Y""Z",
            
"a""b""c""d""e""f""g""h""i""j""k""_""m",
                
"n""o""p""q""r""s""t""u""v""w""x""y""z",
            
"0""1""2""3""4""5""6""7""8""9"
        
},
        
xChars[16] = "",
        
xReactionTimer,
        
xCash,
        
xScore,
        
boolxTestBusy

Despuйs el siguiente cуdigo:


PHP код:
    if(!strcmp(xCharstextfalse))
                        {
                            new 
string[128],NameNick[MAX_PLAYER_NAME];
                            
GetPlayerName(playeridNameNicksizeof(NameNick));
                            
format(stringsizeof(string), "« {ffffff}' \%s ' {00FFFF}es el ganador del test de reacciуn »"NameNick);
                            
SendClientMessageToAll(0x00FFFFAAstring);
                            
format(stringsizeof(string), "« Tu has ganado $%d + %d de score »"xCashxScore);
                            
SendClientMessage(playerid0x00FF00C8string);
                            
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
                            
GameTextForPlayer(playerid"~y~winner~n~~p~Premio Obtenido"30003);
                            
GivePlayerMoney(playeridxCash);
                            
SetPlayerScore(playeridGetPlayerScore(playerid) + xScore);
                            
SavePlayer(playerid);
                             
#if defined USE_STATS
                             
PlayerInfo[playerid][Kills] = PlayerInfo[playerid][Kills]+ xScore;
                            
#endif
                            
xReactionTimer SetTimer("xReactionTest"TIME1);
                            
xTestBusy false;
                        }
                }
        }
        return 
1;

Despuйs la funciуn:


PHP код:
function xReactionTest()
{
        new
                
xLength = (random(8) + 5),
                
string[128]
        ;
        
xCash = (random(10000) + 20000);
        
xScore = (random(2)+4);
        
format(xCharssizeof(xChars), "");
        
Loop(xxLengthformat(xCharssizeof(xChars), "%s%s"xCharsxCharacters[random(sizeof(xCharacters))][0]);
        
format(stringsizeof(string), "[Test]: {00FFFF}Quien sea el primero en escribir{FFFFFF} %s {00FFFF}ganara $%d +%d de score"xCharsxCashxScore);
        
SendClientMessageToAll(0xFFFFFFAAstring);
        
KillTimer(xReactionTimer);
        
xTestBusy true;
    
//    SetTimer("xReactionProgress", 50000, 0);
        
return 1;

Esto estaba en GameModeInit, Supongo yo que es tambien del codigo porque arriba en la funcion esta.
PHP код:
    xReactionTimer SetTimer("xReactionTest"TIME1); 
Espero que me puedan ayudar.
Reply


Messages In This Thread
Recompensas por Escribir una frase. - by ronaldfa - 28.05.2015, 00:34
Re: Recompensas por Escribir una frase. - by SickAttack - 28.05.2015, 01:48

Forum Jump:


Users browsing this thread: 1 Guest(s)