Jump to content

d@rK

Membru
  • Posts

    79
  • Joined

  • Last visited

Everything posted by d@rK

  1. Can dau /getallhere apare: Administrator d@rK has teleported everyone to him DE vreo 20 de ori :| :| :| PAWNO: [pawn]if(strcmp(cmd, "/getallhere", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 5) { GetPlayerName(playerid, sendername, sizeof(sendername)); for(new i = 0; i < MAX_PLAYERS; i ++) { if(IsPlayerConnected(i)) { format(string, 256, "Administrator %s has teleported everyone to himself.", sendername); BroadCast(COLOR_LIGHTRED,string); new Float:ix, Float:iy, Float:iz; GetPlayerPos(playerid, ix, iy, iz); SetPlayerInterior(i, GetPlayerInterior(playerid)); SetPlayerPos(i, ix, iy, iz+1); GetPlayerName(playerid, sendername, sizeof(sendername)); printf("[Warning] %s has teleported all players to him", sendername); ABroadCast(COLOR_LIGHTRED,string,1); } } } else { SendClientMessage(playerid, COLOR_RED, "Nu ai acces la aceasta comanda!"); } } else { SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!"); } return 1; }[/pawn]
  2. A mers frate mersi mult! +1 P.S. Sa te uiti si la bodyweapons te rog ok ? ms
  3. d@rK

    Problema /ad

    A mers mersi frate:D +1
  4. d@rK

    Problema /ad

    Dupa ce un player da /ad el nu poate sa mai dea 2 minute, dar alt player poate sa dea... De exemplu pot sa dea 1000 player de-odata /ad, apoi fiecare asteapta 1 minut... SI EU AS VREA daca a dat un Player Oarecare /AD sa numai poata NIMENI sa dea timp de 1 MINUT. PAWNO: [pawn]if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "You haven't logged in yet !"); return 1; } if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GREY, "Nu ai level 3 pentru a folosi comanda /ad !"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } for(new i=0; i<MAX_PLAYERS; i++) if(FindIP(result)) /// { new advertiser[MAX_PLAYER_NAME]; GetPlayerName(playerid, advertiser, sizeof(advertiser)); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); SendClientMessageToAll(COLOR_LIGHTGREEN, ""); format(string, sizeof(string), "[Warning]: %s[iD: %d] face reclama",advertiser,i); ABroadCast(COLOR_LIGHTRED,string,1); return 0; } result[idx - offset] = EOS; result[0] = toupper(result[0]); if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/ad)vertise [advert text]"); return 1; } if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1)) { format(string, sizeof(string), "Please try again later %d seconds between Advertisements !", (addtimer/1000)); SendClientMessage(playerid, COLOR_GRAD2, string); return 1; } new payout = idx * 25; if(GetPlayerCash(playerid) < payout) { format(string, sizeof(string), "* You used %d characters which cost $%d, you don't have enough.", offset, payout); SendClientMessage(playerid, COLOR_WHITE, string); return 1; } if(adTime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "Asteapta 150 secunde pentru a putea da inca 1 anunt."); GivePlayerCash(playerid, - payout); SBizzInfo[7][sbTill] += payout; ExtortionSBiz(7, payout); format(string, sizeof(string), "{FFFF00}Anunt publicat de {00FF7F}%s{FF6347}({FFFF00}Telefon: {FFFAFA}%d{FF6347}): {0099FF}%s", sendername,PlayerInfo[playerid][pPnumber],result); SendClientMessageToAll(COLOR_YELLOW,string); format(string, sizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters", payout, idx); GameTextForPlayer(playerid, string, 5000, 1); adTime[playerid] = 1; SetTimerEx("Advertise", 150000, 0, "%d", playerid); if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;} } return 1; }[/pawn]
  5. Cand dau /report(pt. admini) sau /ajutor(pt. helperi) in loc sa scrie textul care il scrii, apare un numar... De exemplu: "/report am nevoie de un admin" si la admini apare "REPORT from x: 123" 123 in loc de mesaj... PAWNO: 1./report: [pawn]if(strcmp(cmd, "/report", true) == 0) { if(IsPlayerConnected(playerid)) { 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, "Use: /report [text]"); return 1; } if(rTime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "{FF6347}[bloodZone]: {FFFFFF}Asteapta {FFFF00}30 secunde {FFFFFF}pentru urmatorul report {FFFF00}!"); format(string, sizeof(string), "{228B22}[REPORT] {FF1493}%s{FFF0F5} ({FF1493}ID: %d{FFF0F5}){FF0000}: {FF0000}%d", sendername,playerid, (result)); ABroadCast(COLOR_RED,string,1); SendClientMessage(playerid, COLOR_YELLOW, "{FFFF00}Raportul tau a fost trimis la Adminii {40E0D0}Blood Zone."); rTime[playerid] = 1; SetTimerEx("Report", 30000, 0, "%d", playerid); } return 1; }[/pawn] PAWNO: 2. /ajutor [pawn]if(strcmp(cmd, "/ajutor", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pHMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "Ai fost redus la tacere, nu poti vorbi!"); 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, "USAGE: /ajutor [text]"); return 1; } if(ajTime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "{FF6347}[bloodZone]: {FFFFFF}Asteapta {FFFF00}30 secunde {FFFFFF}pentru urmatorul ajutor {FFFF00}!"); format(string, sizeof(string), "{228B22}[AJUTOR] {FF1493}%s {F0FFF0}({FF1493}ID: %d{F0FFF0}){FFD700}: {7CFC00}%d", sendername,playerid, (result)); HBroadCast(COLOR_YELLOW,string); SendClientMessage(playerid, COLOR_YELLOW, "{FFFF00}Cererea de ajutor a fost trimisa la Agentii {40E0D0}Blood Zone."); ajTime[playerid] = 1; SetTimerEx("Ajutor", 30000, 0, "%d", playerid); } return 1; }[/pawn]
  6. TE ROGG Gireada repara-l sau da-mi link de la altul te rogg frumoss!! :(
  7. Gata, am reusit, Ms Mult Gireada :*
  8. Gireada, imi spune "Nu ai acces la aceasta comanda"
  9. Tot nu-mi merge... Gireada te rog eu uite-te atent ca trebuie sa fie ceva gresit acolo. :(
  10. MERSI MULT ANDREYUTZ ! AM REUSIT +1 MS! :* ms si tie gireada ca ai incercat... :)
  11. tot nu merge EROAREA: function "KickWithMessage" is not implemented EROAREA2: start of function body without function header
  12. Dar as vrea sa mi-l faci pe asta te rog... Uite-te parca e ceva in neregula la sendmessagetoall acolo, parca nu are logica uite-te cu atentie te rog pe la if(!strlen(cmdtext[6])) return SendClientMessage(playerid,0xFFFFFFAA, "Usage: /vot [intrebare]"); SendClientMessageToAll(LARANJA,"===================================="); format(string, sizeof string, "==> New Vote: %s?", cmdtext[6]); SendClientMessageToAll(VERDECLARO, string);
  13. Imi da erori: C:\Users\Mihnea\Desktop\BloodZone\gamemodes\BloodZone.pwn(16105) : error 001: expected token: ")", but found "&" C:\Users\Mihnea\Desktop\BloodZone\gamemodes\BloodZone.pwn(16105) : error 029: invalid expression, assumed zero C:\Users\Mihnea\Desktop\BloodZone\gamemodes\BloodZone.pwn(16114) : error 001: expected token: ")", but found "&&" C:\Users\Mihnea\Desktop\BloodZone\gamemodes\BloodZone.pwn(16114) : error 029: invalid expression, assumed zero C:\Users\Mihnea\Desktop\BloodZone\gamemodes\BloodZone.pwn(37626) : error 035: argument type mismatch (argument 3) C:\Users\Mihnea\Desktop\BloodZone\gamemodes\BloodZone.pwn(38240) : error 035: argument type mismatch (argument 3) Linia 16105: stock KickWithMessage(playerid, color, message[]) Linia 16114: stock BanWithMessage(playerid, color, message&[]) Linia 37626: KickWithMessage(playerid, 0xFF0000FF, "Ai primit kick de la Admin!"); Linia 38240: BanWithMessage(playerid, 0xFF0000FF, "Ai primit ban de la Admin!");
  14. Am sa incerc, revin cu reply sa zic daca am reusit.
  15. Deci, cand scriu /vot apare: USAGE: /vot [text] Apoi daca dau sa zicem /vot Cine e cel mai tare? Numai apare nimic!
  16. Nu, dar nu se poate fara rcon?
  17. La comenzile Kick/Ban cand ii dau sa zicem ban unui player, apare la tot serveru ca i-am dat ban, DAR celui caruia i-am dat ban Nu ii Arata, ii Arata doar "Server Closed Connection". As vrea sa ii apara si playerului care a luat ban... Pawno(in GM): 1.Kick [pawn]if(strcmp(cmd, "/kick", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /kick [playerid/PartOfName] [reason]"); return 1; } giveplayerid = ReturnUser(tmp); if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pAgent] >= 1) { if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); 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, "USAGE: /kick [playerid/PartOfName] [reason]"); return 1; } if(kicktime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "Wait 10 seconds!"); new year, month,day; getdate(year, month, day); format(string, sizeof(string), "AdmCmd: %s a primit kick de la Adminul %s. Motiv: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year); KickLog(string); format(string, sizeof(string), "SERVER: {FF0000}%s {00FF00}a primit kick de la Adminul {FF0000}%s. {00FF00}Motiv: {FF00D9}%s", giveplayer, sendername, (result)); SendClientMessageToAll(COLOR_CAPONE, string); format(string, sizeof(string), "Ai primit kick de la Adminul %s. Motiv: %s",sendername,(result)); SendClientMessage(giveplayerid, COLOR_RED, string); kicktime[playerid] = 1; SetTimerEx("kickt", 10000, 0, "%d", playerid); Kick(giveplayerid); return 1; } } } else { format(string, sizeof(string), "%d is not an active player.", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; }[/pawn] 2. Ban [pawn]if(strcmp(cmd, "/ban", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ban [playerid/PartOfName] [reason]"); return 1; } giveplayerid = ReturnUser(tmp); if (PlayerInfo[playerid][pAdmin] >= 5) { if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); 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, "USAGE: /ban [playerid/PartOfName] [reason]"); return 1; } if(bantime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "Are you trying to ban this server?"); new year, month,day; getdate(year, month, day); format(string, sizeof(string), "AdmCmd: %s a fost banat de catre Adminul %s. Motiv: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year); BanLog(string); format(string, sizeof(string), "SERVER: {FF0000}%s {00FF00}a fost banat de catre Adminul {FF0000}%s. {00FF00}Motiv: {FF00D9}%s", giveplayer, sendername, (result)); SendClientMessageToAll(COLOR_CAPONE, string); new playersip[256]; GetPlayerIp(giveplayerid,playersip, sizeof(playersip)); SendClientMessage(giveplayerid,COLOR_GREEN,"|___________[bAN INFO]___________|"); format(string, sizeof(string), "Numele tau este: %s.",giveplayer); SendClientMessage(giveplayerid, COLOR_RED, string); format(string, sizeof(string), "IP-ul tau este: %s.",playersip); SendClientMessage(giveplayerid, COLOR_RED, string); format(string, sizeof(string), "Ai fost banat de: %s.",sendername); SendClientMessage(giveplayerid, COLOR_RED, string); format(string, sizeof(string), "Motiv: %s.",(result)); SendClientMessage(giveplayerid, COLOR_RED, string); format(string, sizeof(string), "Data: %d/%d/%d",day,month,year); SendClientMessage(giveplayerid, COLOR_RED, string); SendClientMessage(giveplayerid,COLOR_GREEN,"|___________[bAN INFO]___________|"); bantime[playerid] = 1; SetTimerEx("bant", 10000, 0, "%d", playerid); Ban(giveplayerid); return 1; } } } else { format(string, sizeof(string), "%d is not an active player.", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; }[/pawn]
  18. Am un FS Vote System, dar cand dau /vote "Cine e cel mai tare?" (exemplu...) pur si simplu Nu Apare Votul... Imi puteti spune ce este gresit? Multumesc. Pawno(FS): [pawn]#include <a_samp> //============================================================================== #define LARANJA 0xFF6600AA #define VERDECLARO 0x00FF0CAA #define VERDEMEDIO 0xa5b1A3AA #define BRANCO 0xFFFFFFAA #define VERMELHO 0xFF0000AA #define VERDEFRACO 0x80cf80AA //============================================================================== enum e_votacao { bool:iniciada, sim, nao, total } new votacao[e_votacao]; new votou[MAX_PLAYERS]; //============================================================================== public OnFilterScriptInit() { print("==================================="); print("==>> Filter Script of Vote! <<=="); print("==>> Created by Me <<=="); print("==>> Version RO 0.1 BETA <<=="); print("==================================="); return 1; } //============================================================================== public OnPlayerCommandText(playerid, cmdtext[]) { new string[256]; if(!strcmp(cmdtext, "/vot", true,5)) { if (!IsPlayerAdmin(playerid)) { if(!votacao[iniciada]) { if(!strlen(cmdtext[6])) return SendClientMessage(playerid,0xFFFFFFAA, "Usage: /vot [intrebare]"); SendClientMessageToAll(LARANJA,"===================================="); format(string, sizeof string, "==> New Vote: %s?", cmdtext[6]); SendClientMessageToAll(VERDECLARO, string); SendClientMessageToAll(LARANJA," "); SendClientMessageToAll(LARANJA," > Pentru a vota foloseste:"); SendClientMessageToAll(VERDEMEDIO, "> /da - Daca esti de acord."); SendClientMessageToAll(VERDEMEDIO, "> /nu - Daca nu esti de acord."); SendClientMessageToAll(LARANJA,"===================================="); votacao[iniciada] = true; votacao[sim] = 0; votacao[nao] = 0; GameTextForAll("~w~Noul ~r~vot~w~ a fost~b~ creat!",6000,3); for(new i; i <MAX_PLAYERS; i++) { votou = false; } } else { SendClientMessage(playerid,BRANCO,"Este deja un vot in desfasurare!"); } } else { SendClientMessage(playerid,BRANCO,"Nu ai acces la aceasta comanda!"); } return 1; } if(!strcmp(cmdtext, "/da", true)) { if(votacao[iniciada] && !votou[playerid]) { SendClientMessage(playerid,LARANJA, "Votul tau a fost inregistrat! [DA]"); votacao[sim]++; votacao[total]++; votou[playerid] = true; return 1; } return 0; } if(!strcmp(cmdtext, "/nu", true)) { if(votacao[iniciada] && !votou[playerid]) { SendClientMessage(playerid,LARANJA, "Votul tau a fost inregistrat! [NU]"); votacao[nao]++; votacao[total]++; votou[playerid] = true; return 1; } return 0; } if(!strcmp(cmdtext, "/end", true)) { if (IsPlayerAdmin(playerid)) { if(votacao[iniciada]) { SendClientMessageToAll(LARANJA,"===================================="); SendClientMessageToAll(LARANJA, "==> Vot inchis! <<=="); format(string, sizeof string, "> %d jucatori au fost de acord.", votacao[sim]); SendClientMessageToAll(VERDEMEDIO,string); format(string, sizeof string, "> %d jucatori nu au fost de acord.", votacao[nao]); SendClientMessageToAll(VERDEMEDIO, string); format(string, sizeof string, "> Aces vot a adunat %d de voturi.",votacao[total]); SendClientMessageToAll(BRANCO, string); if(votacao[sim] == votacao[nao]) { SendClientMessageToAll(VERMELHO, "==> A fost egalitate!"); } else if(votacao[sim] > votacao[nao]) { SendClientMessageToAll(VERMELHO, "==> Cei mai multi au fost de acord. [NU]"); } else if(votacao[sim] < votacao[nao]) { SendClientMessageToAll(VERMELHO, "==> Cei mai multi nu au fost de acord. [DA]"); } SendClientMessageToAll(LARANJA,"===================================="); GameTextForAll("~r~A Votul~w~ s-a~r~ ~b~terminat!",6000,3); votacao[iniciada] = false; votacao[sim] = 0; votacao[nao] = 0; votacao[total] = 0; for(new i; i <MAX_PLAYERS; i++) { votou = false; } } else { SendClientMessage(playerid,BRANCO, "Nici un vot nu a fost pornit!"); } } else { SendClientMessage(playerid,BRANCO, "Nu ai acces la aceasta comanda!"); } return 1; } return 0; }[/pawn]
  19. d@rK

    Problema /event

    Rezlvat, ms! +1.
  20. Merci, rezolvat. +1 .
  21. Am bagat acest script pt. a arata numele playerilor in chat cu culoarea factiunii in care sunt, dar uneori arata numele playerilor cu culoarea negra, din orice factiune ar fi... De ce? [pawn]{ new pName[MAX_PLAYER_NAME], String[150]; GetPlayerName(playerid, pName, sizeof(pName)); format(String, sizeof(String), "%s: {FFFFFF}%s", pName, text); ProxDetector(20.0, playerid, String, GetPlayerColor(playerid)); return 0; }[/pawn] EDIT: EDIT: Am rezolvat Singur! Puteti da T/C. Imi pare rau. Ms.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.