- 0
Problema /ad
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
MisterM983
Problemă întâlnită (descriere): Prima data vreau sa pun timp intre /ad ca se poate da non stop , si a doua am comanda /cancel ad in script si cand o activez imi da errori! va rog ajutati-ma multumesc
Ero(area / rile) / warning-(ul / urile): la /ad nu am errori ! la cancel ad am errori ---
(49454) : error 017: undefined symbol "PlayerNeedAD"
(49454) : warning 215: expression has no effect
(49454) : error 001: expected token: ";", but found "]"
(49454) : error 029: invalid expression, assumed zero
(49454) : fatal error 107: too many error messages on one line
Liniile de cod / sursa / script-ul: La /ad vreau sa pun timp 60 secunde intre ad si inainte sa se posteze la toti sa vada si adminii ad-ul va rog frumos din inima asta ma incurca...si vreau sa deschid serverul plzz
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) { 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; IAR /ad unde trebuie pus 60 sec 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]--; format(string, sizeof(string), "{2BC700}Anunt: %s, {F2EE00}By: %s Tel: %d", result, sendername,PlayerInfo[playerid][pPnumber]); SendClientMessageToAll(COLOR_WHITE, string); format(string, sizeof(string), "~r~Ai platit %d Lei~n~~w~Mesajul Contine: %d Caractere", payout, idx); NextAd[playerid] = 0; GameTextForPlayer(playerid, string, 5000, 5); if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;} } 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] = 0; format(string, sizeof(string), "{2BC700}Anunt: %s, {F2EE00}By: %s Tel: %d", result, sendername,PlayerInfo[playerid][pPnumber]); SendClientMessageToAll(COLOR_WHITE, string); format(string, sizeof(string), "~r~Ai platit %d Lei~n~~w~Mesajul Contine: %d Caractere", payout, idx); GameTextForPlayer(playerid, string, 5000, 5); if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;} } else { SCM(playerid,COLOR_LIGHTRED,"Nu esti la agentie de anunturi."); } return 1; }Imagini / Video (optional):
Aţi încercat să rezolvaţi singur?: da... imi da errori
MULTUMESC MULT RAMAN DATOR
22 answers to this question
Recommended Posts