- 0
Timer /news
-
Similar Content
-
- 20 replies
- 3.545 views
-
-
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
DarkWolf
Nick: DarkWolf
Problema: Vreau sa adaug un timer intre /news de 1 minut
Erori / warnings: -
Lini/script:
if(strcmp(cmd, "/news", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) { new newcar = GetPlayerVehicleID(playerid); if(PlayerInfo[playerid][pMuted] == 1) { format(string, sizeof(string), "You can not speak, you have been silenced for %d seconds.",PlayerInfo[playerid][pMuteTime]); SendClientMessage(playerid, COLOR_LIGHTRED, string); return 1; } if(newcar == 140 || newcar == NR1 || newcar == NR2) { 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: /news [newstext]"); return 1; } if(PlayerInfo[playerid][pAdmin] == 0 || PlayerInfo[playerid][pHelper] == 0) { for(new i=0; i<MAX_ENTRY; i++) { if(!Swear[i][0]) continue; Cenzura(result,Swear[i]); } } if(FindIP(result)) /// Anti-Reclama { SendClientMessage(playerid, COLOR_RED, "You have kicked for Guardian , because you wrote an IP Adress."); new advertiser[MAX_PLAYER_NAME]; GetPlayerName(playerid, advertiser, sizeof(advertiser)); format(string, sizeof(string), "GL BOT: {FFFF00}%s a primit Kick cu motivul: A scris un IP (Reclama)",advertiser); SendClientMessageToAll(COLOR_RED,string); KickLog(string); Kick(playerid); return 1; } if(anty(result) && PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pHelper] == 0) { new advertiser[MAX_PLAYER_NAME]; GetPlayerName(playerid, advertiser, sizeof(advertiser)); format(string, sizeof(string), "GL BOT: {FFFF00}%s a primit Kick cu motivul: Reclama pe /news",advertiser); SendClientMessageToAll(COLOR_RED,string); Kick(playerid); return 0; } format(string, sizeof(string), "NR %s: %s", sendername, result); OOCNews(COLOR_NEWS,string); PlayerInfo[playerid][pNewsSkill] ++; if(PlayerInfo[playerid][pNewsSkill] == 50) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 2, soon you are able to Fly the News Chopper and talk Live."); } else if(PlayerInfo[playerid][pNewsSkill] == 100) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 3, soon you are able to Fly the News Chopper and talk Live."); } else if(PlayerInfo[playerid][pNewsSkill] == 200) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 4, you can fly the News Chopper now."); } else if(PlayerInfo[playerid][pNewsSkill] == 400) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 5, you can now talk Live with any person you want."); } } else { SendClientMessage(playerid, COLOR_GREY, " You are not in the News Van or Chopper !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a News Reporter !"); } }//not connected return 1; }Ai incercat sa rezolvi singur ?: Da si nu imi da nici o eroare/advertisment, dar nici nu merge
15 answers to this question
Recommended Posts