Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------------------------[advertise]-----------------------------------------------
- if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet !");
- return 1;
- }
- if(PlayerInfo[playerid][pLevel] < 2)
- {
- SendClientMessage(playerid, 0x4FA7FFFF, "*** You must be level 2 to use /ad");
- return 1;
- }
- if(PlayerInfo[playerid][pMuted] == 1)
- {
- SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced !");
- 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;
- 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_LIGHTBLUE, string);
- return 1;
- }
- if(FindIP(result)) /// Anti-Reclama
- {
- SendClientMessage(playerid, COLOR_RED, "You have kicked for Guardian , because you write an IP Adrees.");
- new advertiser[MAX_PLAYER_NAME];
- GetPlayerName(playerid, advertiser, sizeof(advertiser));
- BanLog(string);
- Ban(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), "SS Bot: {FFFF00}%s was kicked with reason: Reclama pe /ad",advertiser);
- SendClientMessageToAll(COLOR_RED,string);
- Kick(playerid);
- return 0;
- }
- 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]);
- }
- }
- GivePlayerCash(playerid, - payout);
- SBizzInfo[7][sbTill] += payout;
- ExtortionSBiz(7, payout);
- format(string, sizeof(string), "Anunt publicat de Contact: %s (Telefon: %d): %s", result, sendername,PlayerInfo[playerid][pPnumber]);
- OOCNews(0x00FF0096,string);
- format(string, sizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters", payout, idx);
- GameTextForPlayer(playerid, string, 5000, 5);
- if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
- }
- return 1;
- }
- if(strcmp(cmd, "/collect", true) == 0)//garbagejob
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pJob] != 19)
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not a Garbage Collector. ");
- return 1;
- }
- new tmpcar = GetPlayerVehicleID(playerid);
- if(IsAGarbageTruck(tmpcar))
- {
- if(PlayerInfo[playerid][pGarbageTime] == 0)
- {
- if(IsCollectingRubbish[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, " INFO: Head to all the check points, then return to the depositt for a pay check.");
- SetPlayerCheckpoint(playerid, 2272.6401,-1918.6245,13.1102, 5.0);
- IsCollectingRubbish[playerid] = 1;
- PlayerInfo[playerid][pGarbageTime] += 900;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are already collecting rubbish!");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " Wait until the next garbage run is available!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are not in a Garbage Truck.");
- return 1;
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment