16.11.2009, 21:29
pongo esto por si otros tenian el mismo problema o querian hacer ese cambio puedan hacerlo, solo necesitamos que alguien nos ayude,
Quisiera que cuando dijera "Falla" salga en rojo no en el mismo color que el de "Conseguir" y que solo lo pudieran utilizar 3 veces, muchas personas abusan de el codigo y lo pueden hacer infinitas veces.
Код:
if(strcmp(cmd, "/intentar", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " No te has Logeado"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USO: /intenta [accion]"); return 1; } new randa = random(2)+1; if(PlayerInfo[playerid][pMaskuse] == 1) { if(randa == 1) format(string, sizeof(string), "*** Extraсo intenta %s y lo consigue!", result); else format(string, sizeof(string), "*** Extraсo intenta %s, pero falla!!", result); } else { if(randa == 1) format(string, sizeof(string), "*** %s intenta %s y lo consigue!", sendername, result); else format(string, sizeof(string), "*** %s intenta %s, pero falla!", sendername, result); } ProxDetector(30.0,playerid, string, COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN); printf("%s", string); } return 1; }