#include <a_samp>#include <zcmd>#include <fixchars>#define Dialog_verseny 12345new InRace[MAX_PLAYERS];forward CountDerby( playerid );new iCountNumber = 0, iCountTimer;CMD:join(playerid, params[]){ ShowPlayerDialog(playerid, Dialog_verseny, DIALOG_STYLE_LIST, \"Válassz versenyt\", \"- SF DRAG -\\n- Rally -\", \"Índitás\", \"Mégsem\"); return 1;}public CountDerby( playerid ){iCountNumber --; if( InRace[ playerid ] == 1 ) {if( iCountNumber > 0 ){ new szCountString[ 50 + 1 ]; format( szCountString, sizeof( szCountString ), \"~r~~h~Verseny Kezdése %d\", iCountNumber ); GameTextForPlayer( playerid, szCountString, 1000, 5 ); } }if( iCountNumber == 0 ){ if( InRace[ playerid ] == 1 ) { GameTextForPlayer( playerid, \"~r~~h~- Start -\", 1000, 5 ); TogglePlayerControllable( playerid, 1 ); KillTimer( iCountTimer ); } }}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == Dialog_verseny) { if(response) { // Give them the weapon if(listitem == 0) // They selected the first item - Desert Eagle { new string[64], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,MAX_PLAYER_NAME); format(string,sizeof string,\"%s csatlakozott ( San Fierro Drag ) versenyhez! [ Csatlakozás: /join ]!\",pName); SendClientMessageToAll(0xFFFFFFAA,string); InRace[ playerid ] = 1; if( InRace[ playerid ] == 1 ) { iCountNumber = 30; iCountTimer = SetTimer( \"CountDerby\", 900, true ); TogglePlayerControllable( playerid, 0 ); GetPlayerName(playerid,pName,MAX_PLAYER_NAME); format(string,sizeof string,\"Játékos %s elíditotta ( San Fierro Drag ) versenyét! [ Csatlakozás: /join ]!\",pName); SendClientMessageToAll(0xFFFFFFAA,string); } } }return 1; } return 0;}
#include <a_samp>#include <zcmd>#include <fixchars>#define Dialog_verseny 12345new InRace[MAX_PLAYERS];new RacePlayers;forward CountDerby(playerid);newiCountNumber = 0, iCountTimer;CMD:join(playerid) return ShowPlayerDialog(playerid, Dialog_verseny, DIALOG_STYLE_LIST, \"Válassz versenyt\", \"- SF DRAG -\\n- Rally -\", \"Índitás\", \"Mégsem\");public CountDerby(playerid) {iCountNumber --;for( new i; i < MAX_PLAYERS; i++) {if(!IsPlayerConnected(i) && InRace != 1) continue; if( iCountNumber > 0 ) { new szCountString[50 + 1]; format(szCountString, sizeof(szCountString), \"~r~~h~Verseny Kezdése %d\", iCountNumber); GameTextForPlayer(i, szCountString, 1000, 5); }if( iCountNumber == 0 ) { if( InRace == 1) { GameTextForPlayer( i, \"~r~~h~- Start -\", 1000, 5 ); TogglePlayerControllable( i, 1 ); KillTimer( iCountTimer ); }}}return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == Dialog_verseny) { if(response) { if(listitem == 0) { new string[64], pName[24]; GetPlayerName(playerid, pName, 24); format(string, sizeof(string), \"%s csatlakozott ( San Fierro Drag ) versenyhez! [ Csatlakozás: /join ]!\",pName); SendClientMessageToAll(0xFFFFFFAA,string); InRace[ playerid ] = 1; RacePlayers ++; TogglePlayerControllable( playerid, 0 ); GetPlayerName(playerid,pName,MAX_PLAYER_NAME); if(RacePlayers == 1 ) { iCountNumber = 30; iCountTimer = SetTimer( \"CountDerby\", 900, true ); format(string,sizeof string,\"Játékos %s elíditotta ( San Fierro Drag ) versenyét! [ Csatlakozás: /join ]!\",pName); SendClientMessageToAll(0xFFFFFFAA,string); } else{ format(string,sizeof string,\"Játékos %s csatlakozott a ( San Fierro Drag ) versenyre! [ Csatlakozás: /join ]!\",pName); SendClientMessageToAll(0xFFFFFFAA,string); } // ide az eltelézést meg ezeket } }} return 0;}