28.09.2011, 18:28
Bom, to com 1 fs que peguei na ips e de 10 em 10 minutos ele manda 1 sendmessagetoall dizendo: quem digitar tal palavra primeiro ganha 5000, sendo que quando eu digito, nгo ganho o $ e manda outra mensagem com outro cуdigo e assim em diante.. o cуdigo й esse, alguйm sabe como fixar?
O meu outro pedido de ajuda й num textdraw que criei no Zameroth, botei ele como FS mas quando dou GMX, ele nгo da reload, alguйm sabe como fixar?
Код:
/* @Author: [iPs]SuYaNw / eu mesmo xD @For: iPs TeaM */ #include <a_samp> #define MAX_CHAR_FOR_REACTION (4) #define TIME_FOR_NEW_REACTION (100000) #define MONEY_RECEIV_REACTION (5000) LoadReaction(); new string[100], _stri[128], Acertou, stchar, chars[] = { "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R", "S","T","U","V","W","X","Y","1","2","3","4","5","6","7","8","9","0", "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r", "s","t","u","v","w","x","y","Z","z" } ; public OnFilterScriptInit() { print("--------------------- Teste de Reaзгo ---------------------"); print(" Por: [iPs]SuYaNw' \n\n"); print("Configuraзгo:"); printf( " - Mбximo Caratere por reaзгo: %d\n - Tempo para nova reaзгo: %d\n - Dinheiro a cada reaзгo: %d", MAX_CHAR_FOR_REACTION, TIME_FOR_NEW_REACTION, MONEY_RECEIV_REACTION); print("--------------------- Teste de Reaзгo ---------------------"); SetTimer("LoadReaction", TIME_FOR_NEW_REACTION, true); return true; } public LoadReaction() { _stri[0] = EOS; stchar = -1; for(new i; i < MAX_CHAR_FOR_REACTION; ++i) strcat(_stri, chars[random(sizeof(chars))]); format(string, sizeof(string),"{FF00FF}[TEST-REAЗГO]{FFFFFF}: Quem digitar primeiro {FF0000}%s{FFFFFF} ganha %d de grana!", _stri, MONEY_RECEIV_REACTION); SendClientMessageToAll(-1, string); Acertou = 0xFFFFFF; stchar = strlen(_stri); return true; } public OnPlayerText(playerid, text[]) { if(!(strlen(_stri) < stchar)) { if(!strcmp(text, _stri, false)) { if(Acertou != -1) { GetPlayerName(Acertou, string, 24); format(string, sizeof(string),"Desculpe, mais o %s jб acertou a palavra: %s", string, _stri); SendClientMessage(playerid, -1, string); return false; } GetPlayerName(playerid, string, 24); format(string, sizeof(string),"%s[%i] Acertou no teste de Reaзгo!!, palavra: %s !! Parabйns!!!",string, playerid, _stri); SendClientMessageToAll(-1, string); Acertou = playerid; return false; } } return 1; }
Код:
/* Filterscript generated using Zamaroht's TextDraw Editor Version 1.0. Designed for SA-MP 0.3a. Time and Date: 2011-9-28 @ 14:36:9 Instructions: 1- Compile this file using the compiler provided with the sa-mp server package. 2- Copy the .amx file to the filterscripts directory. 3- Add the filterscripts in the server.cfg file (more info here: https://sampwiki.blast.hk/wiki/Server.cfg) 4- Run the server! Disclaimer: You have full rights over this file. You can distribute it, modify it, and change it as much as you want, without having to give any special credits. */ #include <a_samp> new Text:Textdraw0; new Text:Textdraw1; public OnFilterScriptInit() { print("Textdraw file generated by"); print(" Zamaroht's textdraw editor was loaded."); // Create the textdraws: Textdraw0 = TextDrawCreate(245.000000, 4.000000, "CraftLandia RPG v1.0"); TextDrawBackgroundColor(Textdraw0, 255); TextDrawFont(Textdraw0, 2); TextDrawLetterSize(Textdraw0, 0.500000, 1.000000); TextDrawColor(Textdraw0, -3585); TextDrawSetOutline(Textdraw0, 0); TextDrawSetProportional(Textdraw0, 1); TextDrawSetShadow(Textdraw0, 1); Textdraw1 = TextDrawCreate(4.000000, 430.000000, "www.craftlandia.com.br"); TextDrawBackgroundColor(Textdraw1, 255); TextDrawFont(Textdraw1, 1); TextDrawLetterSize(Textdraw1, 0.500000, 1.000000); TextDrawColor(Textdraw1, -1); TextDrawSetOutline(Textdraw1, 0); TextDrawSetProportional(Textdraw1, 1); TextDrawSetShadow(Textdraw1, 1); for(new i; i < MAX_PLAYERS; i ++) { if(IsPlayerConnected(i)) { TextDrawShowForPlayer(i, Textdraw0); TextDrawShowForPlayer(i, Textdraw1); } } return 1; } public OnGameModeInit() public OnFilterScriptExit() { TextDrawHideForAll(Textdraw0); TextDrawDestroy(Textdraw0); TextDrawHideForAll(Textdraw1); TextDrawDestroy(Textdraw1); return 1; } public OnPlayerConnect(playerid) { TextDrawShowForPlayer(playerid, Textdraw0); TextDrawShowForPlayer(playerid, Textdraw1); return 1; }