Оплатили голосами за услугу и её не выполняют более чем 4 дня? - Обращайтесь. Вас оскорбили или поступили нечестно? - Обращайтесь. Увидели на форуме спам\флуд, а модератора нет? - Обращайтесь.
Не забывайте указывать в названии сообщения тему, пример: "Перевод за голоса".
Помогите!Научите вписывать скрипты в сам код мода!!Че за чем вставлять,если можно то на примере....как вставить скрипт ЛОТО в мод Бронтозавра?Всем кто поможет + общею!Очень надо!!!
new Lottery; new LottoEnabled; new string[256]; new playername[MAX_PLAYER_NAME]; new wonlotto[MAX_PLAYERS],donelotto[MAX_PLAYERS]; new jackpot,lotto,lotto2,lotto3,lotto4,lotto5,lotto6; new price = LOTTO_PRICE; new time = HOW_LONG;
public lottery(){ for(new i=0;i<MAX_PLAYERS;i++){ format(string, sizeof(string),"Todays Lotto Numbers: %d, %d, %d, %d, %d, %d!",lotto,lotto2,lotto3,lotto4,lotto5,lotto6); SendClientMessage(i,PURPLE,string); SendClientMessage(i,COLOR_GREEN,"Want to Gamble on the Lotto? Pick a Number! Check Out /lottohelp!"); jackpot = JackpotTotal(); lotto = random(MAX_NO+1); lotto2 = random(MAX_NO+1); lotto3 = random(MAX_NO+1); lotto4 = random(MAX_NO+1); lotto5 = random(MAX_NO+1); lotto6 = random(MAX_NO+1); #if defined STATIC_JACKPOT format(string, sizeof(string),"The Jackpot has been Permantly set to %d!",STATIC_JACKPOT_WINNINGS); SendClientMessage(i,COLOR_GREEN,string); #else format(string, sizeof(string),"Todays Jackpot is $%d!",jackpot); SendClientMessage(i,COLOR_GREEN,string); #endif if (wonlotto[i] ==1){ #if defined STATIC_JACKPOT GetPlayerName(i, playername, MAX_PLAYER_NAME); format(string, sizeof(string),"%s (ID:%d) Has Won the Static Lotto Jackpot of $%d!",playername,i,STATIC_JACKPOT_WINNINGS); SendClientMessageToAll(COLOR_ORANGE,string); GivePlayerMoney(i,STATIC_JACKPOT_WINNINGS[i]); GameTextForPlayer(i,"~g~$$$ !!!! Winner !!!! $$$",5000,5); #else GetPlayerName(i, playername, MAX_PLAYER_NAME); format(string, sizeof(string),"%s (ID:%d) Has Won the Lotto! A Jackpot of $%d",playername,i,jackpot); SendClientMessageToAll(COLOR_ORANGE,string); GameTextForPlayer(i,"~g~$$$ !!!! Winner !!!! $$$",5000,5); #endif //new porn[32]; //format(porn, 32, "%d", jackpot); //new glued = strval(porn); GivePlayerMoney(i,jackpot); donelotto[i] =0; wonlotto[i] =0; return 1; } if(wonlotto[i] == 0 && donelotto[i] == 1){ SendClientMessage(i,COLOR_RED,"Sorry, You Didn't win this time! Please, Try Again!"); donelotto[i] =0; wonlotto[i] =0; return 1; } } return 1; }
dcmd_lotto(playerid, params[]) {
new cmd[256]; new idx; cmd = strtok(params, idx); if(!strlen(params)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /lotto [number]");
if(!LottoEnabled) return SendClientMessage(playerid,RED,"The Lotto is currently Disabled!"); new number = strval(params);
if(number > MAX_NO){ format(string, sizeof(string),"You cannot pick a number higher Than %d!",MAX_NO); SendClientMessage(playerid,COLOR_RED,string); return 1; } if(GetPlayerMoney(playerid) <price ) { format(string, sizeof(string),"You do not Have enough Money. You Require at least $%d",price); SendClientMessage(playerid,COLOR_RED,string); SendClientMessage(playerid,COLOR_RED,"To Purchase a lotto ticket!"); return 1; }
if(donelotto[playerid] ==1) return SendClientMessage(playerid,RED,"You Have already put the lotto on!");
if(number == lotto || number == lotto2 || number == lotto3 || number == lotto4 || number == lotto5 || number == lotto6){
wonlotto[playerid] =1; format(string, sizeof(string),"You have Sucessfully Put the number %d on.",number); SendClientMessage(playerid,GREEN,string); donelotto[playerid] =1; GivePlayerMoney(playerid,-price); }else{ format(string, sizeof(string),"You have Sucessfully Put the number %d on.",number); SendClientMessage(playerid,GREEN,string); donelotto[playerid] =1; GivePlayerMoney(playerid,-price); } return 1; }
dcmd_lottohelp(playerid, params[]){ SendClientMessage(playerid,GREEN,"The Lotto is a Minigame that, if you win,"); SendClientMessage(playerid,GREEN,"Could result in you winning a lot of Money."); SendClientMessage(playerid,GREEN,"The Lotto results come out every so often, and the"); SendClientMessage(playerid,GREEN,"Prizemoney is always different."); format(string, sizeof(string),"To gamble on the Lotto, it costs $%d!",price); SendClientMessage(playerid,COLOR_RED,string); format(string, sizeof(string),"And you must pick a number between 0 and %d.",MAX_NO); SendClientMessage(playerid,COLOR_RED,string); #pragma unused params return 1; }
dcmd_lottoon(playerid, params[]){ if(!IsPlayerAdmin(playerid)) return false; if(LottoEnabled) return SendClientMessage(playerid,RED,"The Lottery is on!"); SendClientMessageToAll(COLOR_ORANGE,"The Lottery has been enabled."); Lottery = SetTimer("lottery",time*1000, 1); SendClientMessage(playerid,GREEN,"You have successfully enabled the Lottery."); LottoEnabled = 1; #pragma unused params return 1; } dcmd_lottooff(playerid, params[]){ if(!IsPlayerAdmin(playerid)) return false; if(!LottoEnabled) return SendClientMessage(playerid,RED,"The Lottery is off!"); SendClientMessageToAll(COLOR_ORANGE,"The Lottery has been Disabled!"); KillTimer(Lottery); SendClientMessage(playerid,GREEN,"You have successfully Disabled the Lottery."); LottoEnabled = 0; #pragma unused params return 1; }
dcmd_lottoprice(playerid, params[]){ if(!IsPlayerAdmin(playerid)) return false; new no = strval(params); if(!strlen(params)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /lottoprice [price]"); if(no == price) return SendClientMessage(playerid,RED,"Tickets are already that Price!"); price = no; format(string,256,"It now costs $%d to purchase a Lotto Ticket.",price); SendClientMessageToAll(COLOR_ORANGE,string); return 1; } dcmd_lottery(playerid, params[]){ if(!IsPlayerAdmin(playerid)) return false; lottery(); SendClientMessage(playerid,GREEN,"You have shown the Lottery."); #pragma unused params return 1; } dcmd_winlotto(playerid, params[]){ if(!strlen(params)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /winlotto [id]"); new endid = strval(params); if(!IsPlayerConnected(endid)) return SendClientMessage(playerid,RED,"Invalid Player ID!"); if(!IsPlayerAdmin(playerid)) return false; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); format(string,256,"You have forced %s (ID: %d) To Win the Next Lotto Draw!",name,endid); SendClientMessage(playerid,COLOR_GREEN,string); wonlotto[endid] =1; donelotto[endid] =1; return 1; }
Ты мя не понял или я тя не понял,вообщем мне надо...все по порядку!Что куда вставлять в код мода,мод будет Бронтозавра!А ты просто мне код скрипта ЛОТО написал!
Пожалуйста подскажите плз!! как зделать так что когда заходишь в аммо тебя не сажали в тюрьму!! (в PWN не разбираюсь) и ещё не могли бы вы мне помочь научится работать с PWN
Shim, читай Samp Textbook , там все поймешь, также вики на нашем форуме, смотри простые моды и фс, которые идут вместе с сервером, начинай с малого, прибавляй понемножку, делай команды, еще всякие фичи. А то ты сразу за pen взялся, начинай понемногу!