Jump to content

MisterM

Membru
  • Posts

    3
  • Joined

  • Last visited

    Never

MisterM's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Ma ajuta cineva pe forumul acesta???
  2. Nick: MisterM Problema: La cnn, pot da /ad incontinu daca ma puteti ajuta sa apara anuntul dupa 60 de secunde , si sa apara adminilor inainte de a aparea tuturor de pe server, am si /cancel ad pe server dar are multe erori ajutatima va rog frumos Erori / warnings: uitati ce apare cand dau compile cu /cancel ad ==== D:\Server\Server\gamemodes\red1.pwn(49434) : error 017: undefined symbol "PlayerNeedAD" D:\Server\Server\gamemodes\red1.pwn(49434) : warning 215: expression has no effect D:\Server\Server\gamemodes\red1.pwn(49434) : error 001: expected token: ";", but found "]" D:\Server\Server\gamemodes\red1.pwn(49434) : error 029: invalid expression, assumed zero D:\Server\Server\gamemodes\red1.pwn(49434) : fatal error 107: too many error messages on one line Lini/script: De la cancel ad uitati scriptu else if(strcmp(x_job,"ad",true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You need to login first !"); return 1; } if(PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pHelper] > 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "Syntax: /cancel ad <PlayerID/PartOfName><Reason>"); return 1; } new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new reason[64]; while ((idx < length) && ((idx - offset) < (sizeof(reason) - 1))) { reason[idx - offset] = cmdtext[idx]; idx++; } reason[idx - offset] = EOS; if(!strlen(reason)) { SendClientMessage(playerid, COLOR_GREY, "Synthax: /cancel ad <PlayerID/PartOfName> <Reason>"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PlayerNeedAD[giveplayerid] == 0) { SCM(playerid, COLOR_GREY, " This player not requested an advertisment"); return 1; } if(allowedlsad[giveplayerid] == 1) { allowedlsad[giveplayerid] = 0; new executatul[MAX_PLAYER_NAME]; new adminul[MAX_PLAYER_NAME]; new string[256]; PlayerNeedAD[giveplayerid] = 0; LSadsent = 0; PlayerInfo[giveplayerid][pAD] = 0; GetPlayerName(giveplayerid, executatul, sizeof(executatul)); GetPlayerName(giveplayerid, adminul, sizeof(adminul)); format(string, sizeof(string),"Administrator %s canceled your advertisment, reason: %s",adminul,reason); SCM(giveplayerid, COLOR_LIGHTRED, string); format(string, sizeof(string),"AdmCmd: %s canceled his %s's advertisment, reason: %s", adminul,executatul,reason); ABroadCast(COLOR_LIGHTRED, string, 1); OnPlayerUpdate(giveplayerid); } if(allowedlvad[giveplayerid] == 1) { allowedlvad[giveplayerid] = 0; new executatul[MAX_PLAYER_NAME]; new adminul[MAX_PLAYER_NAME]; new string[256]; PlayerNeedAD[giveplayerid] = 0; LVadsent = 0; PlayerInfo[giveplayerid][pAD] = 0; GetPlayerName(giveplayerid, executatul, sizeof(executatul)); GetPlayerName(giveplayerid, adminul, sizeof(adminul)); format(string, sizeof(string),"Administrator %s canceled your advertisment, reason: %s",adminul,reason); SCM(giveplayerid, COLOR_LIGHTRED, string); format(string, sizeof(string),"AdmCmd: %s canceled his %s's advertisment, reason: %s", adminul,executatul,reason); ABroadCast(COLOR_LIGHTRED, string, 1); OnPlayerUpdate(giveplayerid); } } } } else { SendClientMessage(playerid, COLOR_GREY, " You are not an admin ! "); return 1; } } return 1; SI DE LA CNN ::: if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0) { if(IsPlayerConnected(playerid)) if(PlayerToPoint(2.0,playerid,648.340087,-1357.425415,13.571000)) { if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GREY, "Ai nevoie de level 3 pentru a scrie un anunt !"); return 1; } if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "Nu poti scrie un anunt ai mute"); return 1; } if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "Nu esti logat !"); 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_GREY, "Type: (/ad)vertise [advert text]"); return 1; } if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1)) { format(string, sizeof(string), "Anuntul tau va aparea in %d secunde, persoanelor de pe server !", (addtimer/1000)); SendClientMessage(playerid, COLOR_GRAD2, string); return 1; } new payout = idx * 25; if(PlayerInfo[playerid][pCash] < payout) { format(string, sizeof(string), "* Ai folosit %d caractere si ai platit %d Lei.", offset, payout); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); return 1; } GivePlayerCash(playerid, -payout); SBizzInfo[7][sbTill] += payout; ExtortionSBiz(7, payout); SBizzInfo[7][sbProducts]--; if(aTime[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "Trebuie sa astepti 60 de secunde pentru urmatorul anunt !"); format(string, sizeof(string), "{2BC700}Anunt: %s, {F2EE00}By: %s Tel: %d", result, sendername,PlayerInfo[playerid][pPnumber]); SendClientMessageToAll(COLOR_WHITE, string); aTime[playerid] = 1; SetTimerEx("Ad", 60000, 0, "%d", playerid); format(string, sizeof(string), "~r~Ai platit %d Lei~n~~w~Mesajul Contine: %d Caractere", payout, idx); NextAd[playerid] = 1; GameTextForPlayer(playerid, string, 5000, 5); } else if(PlayerToPoint(2.0,playerid, 2368.9646,2121.4871,10.8401)) { if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GREY, "Ai nevoie de level 3 pentru a scrie un anunt !"); return 1; } if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "Nu poti scrie un anunt ai mute"); return 1; } if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "Nu esti logat !"); 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_GREY, "Type: (/ad)vertise [advert text]"); return 1; } if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1)) { format(string, sizeof(string), "Anuntul tau va aparea in %d secunde, persoanelor de pe server !", (addtimer/1000)); SendClientMessage(playerid, COLOR_GRAD2, string); return 1; } new payout = idx * 25; if(PlayerInfo[playerid][pCash] < payout) { format(string, sizeof(string), "* Ai folosit %d caractere si ai platit %d Lei.", offset, payout); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); return 1; } GivePlayerCash(playerid, -payout); SBizzInfo[13][sbTill] += payout; ExtortionSBiz(13, payout); SBizzInfo[13][sbProducts]--; NextAd[playerid] = 1; if(aTime[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "Trebuie sa astepti 60 de secunde pentru urmatorul anunt !"); format(string, sizeof(string), "{2BC700}Anunt: %s, {F2EE00}By: %s Tel: %d", result, sendername,PlayerInfo[playerid][pPnumber]); SendClientMessageToAll(COLOR_WHITE, string); aTime[playerid] = 1; SetTimerEx("Ad", 60000, 0, "%d", playerid); format(string, sizeof(string), "~r~Ai platit %d Lei~n~~w~Mesajul Contine: %d Caractere", payout, idx); GameTextForPlayer(playerid, string, 5000, 5); } else { SCM(playerid,COLOR_LIGHTRED,"Nu esti la agentie de anunturi."); } return 1; } Ai incercat sa rezolvi singur ?: da, dar nu pot nici cum...am incercat de 3 saptamani tot incerc..
  3. Nick: MisterM Problema: vreu sa adau timer la CNN, si adaug dar tot timpul dupa ce dai un ad cand vrei sa dai urmatorul ad zice aștepta 60 secunde, adica nu trec alea 60 sec, va rog ajutatima si daca se poate sa apară adminilor inainte ca anunțul sa apară tuturor de pe server si adminii sa poată da /cancel ad am cv cancel ad in script dar da erori! Erori / warnings: da Lini/script: Ai incercat sa rezolvi singur ?: da , dar pun timp si dupa tot asa pare asteapta 60 secunde nu mai poti da urmatorul ad
×
×
  • 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.