Originally Posted by GBLTeam
Yea thanks but this disable only on ic chat btw how to disable on /sms /b /adv ?
SMS CMD:
pawn Код:
if(strcmp(cmd, "/txt", true) == 0 || strcmp(cmd, "/t", true) == 0 || strcmp(cmd, "/sms", true) == 0) { if(IsPlayerConnected(playerid)) { new playercash; playercash = GetPlayerMoney(playerid); if (playercash < 2) { SendClientMessage(playerid, COLOR_GREY, " Nemate dovoljno novca na racunu!"); return 1; } if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " Niste se prijavili!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: (/t)ext [phonenumber] [text chat]"); return 1; } if(PlayerInfo[playerid][pPnumber] == 0) { SendClientMessage(playerid, COLOR_GRAD2, " Nemate telefon..."); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s je uzeo telefon iz dzepa.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); new phonenumb = strval(tmp); 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, "Koriscenje: (/t)ext [phonenumber] [text chat]"); return 1; } if(phonenumb == 555) { if ((strcmp("yes", result, true, strlen(result)) == 0) && (strlen(result) == strlen("yes"))) { SendClientMessage(playerid, COLOR_WHITE, "SMS Poruka je poslata."); if (gTeam[playerid] == 2 || gTeam[playerid] == 1) { SendClientMessage(playerid, COLOR_YELLOW, "SMS: Nemam pojma o cemu pricas, Salje: MOLE (555)"); RingTone[playerid] = 20; return 1; } return 1; } else { SendClientMessage(playerid, COLOR_YELLOW, "SMS: Obicno Yes je dovoljno, Salje: MOLE (555)"); RingTone[playerid] = 20; return 1; } } foreach (Player, i) { if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0) { giveplayerid = i; Mobile[playerid] = giveplayerid; //caller connecting if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PhoneOnline[giveplayerid] > 0) { SendClientMessage(playerid, COLOR_GREY, " Igrac je offline!"); return 1; } format(string, sizeof(string), "SMS: %s, Salje: %s (%d)", result,sendername,PlayerInfo[playerid][pPnumber]); GetPlayerName(giveplayerid, sendername, sizeof(sendername)); //format(string, sizeof(string), "* %s's phone beeps.", sendername); RingTone[giveplayerid] =20; SendClientMessage(playerid, COLOR_WHITE, "Poruka je poslata"); SendClientMessage(giveplayerid, COLOR_YELLOW, string); SendClientMessage(playerid, COLOR_YELLOW, string); format(string, sizeof(string), "~r~$-%d", txtcost); GameTextForPlayer(playerid, string, 5000, 1); SafeGivePlayerMoney(playerid,-txtcost); SBizzInfo[2][sbTill] += txtcost; ExtortionSBiz(2, txtcost); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); Mobile[playerid] = 255; return 1; } } } } SendClientMessage(playerid, COLOR_GRAD2, " Poruka nije poslata..."); } return 1; }
LOCAL OOC CMD:
pawn Код:
if(strcmp(cmd, "/b", true) == 0)//local ooc { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " Niste se prijavili !"); 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, "Koriscenje: /b [lokalni ooc chat]"); return 1; } if(PlayerInfo[playerid][pMaskuse] == 1) { format(string, sizeof(string), "(( Stranac kaze: %s ))", result); } else { format(string, sizeof(string), "(( [%i] %s kaze: %s ))", playerid, sendername, result); } ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); SetPlayerChatBubble(playerid, string, SVETLOPLAVA, 100.0, 5000); printf("%s", string); } return 1; }
Advertise CMD:
pawn Код:
//----------------------------------[advertise]----------------------------------------------- if(strcmp(cmd, "/oglas", true) == 0 || strcmp(cmd, "/ad", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREEN, " Niste prijavljeni (logirani) !"); return 1; } if(PlayerInfo[playerid][pLevel] < 7) { format(string, sizeof(string), "Morate Biti level 7 da bi ste dali [OGLAS]!"); SendClientMessage(playerid, COLOR_GREEN, string); 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_LIGHTRED, "Komanda: /ad [Text]"); return 1; } if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1)) { format(string, sizeof(string), " Molimo pricekajte %d sekunda izmedu oglasa !", (addtimer/1000)); SendClientMessage(playerid, COLOR_RED, string); return 1;
} new payout = idx * 25; if(JB_GetPlayerMoney(playerid) < payout) { format(string, sizeof(string), "Upotrebili ste %d slova, to kosta $%d, nemate dovoljno.", offset, payout); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); return 1; } JB_GivePlayerMoney(playerid, - payout); format(string, sizeof(string), "[OGLAS]: %s \nKontakt: %s \nBroj: %d |", result, sendername,PlayerInfo[playerid][pPnumber]); TextDrawShowForAll(Txtgov); TextDrawSetString(Txtgov, string); SetTimer("Hidegov", 30000, 0); OOCNews(0x0087FFFF,string);
format(string, sizeof(string), "~p~Platili ste $%d~n~~w~Oglas se sastoji od: %d slova", payout, idx); GameTextForPlayer(playerid, string, 5000, 5); if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;} } return 1; }
|