Započeo Mile_Anderson
•13. Jul 2015.• Zaključano[POMOC] Reakcije.
349
pregleda
8
postova
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
131
Postovi:
23
Teme:
Pridružio se:Jan. 2014
13. Jul 2015.
Skripta koju koristim: UP
Opis problema o kojem se radi: ubacio sam reakcije u mod da ne bi koristio fs i sada pojavi se reakcija ja je ukucam ali nista se ne dogadja.....
Dio skripte:
Slika (neobavezno): http://i.imgur.com/GebviEv.png
Opis problema o kojem se radi: ubacio sam reakcije u mod da ne bi koristio fs i sada pojavi se reakcija ja je ukucam ali nista se ne dogadja.....
Dio skripte:
switch(xTestBusy)
{
case true:
{
if(!strcmp(xChars, text, false)) {
new string, pName;
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), ""SC"Reaciont-BOT: "GREY"Igrac "WHITE"%s "GREY"je bio najbrzi i osvojio odredjenu sumu novca", pName);
SendClientMessageToAll(-1, string);
format(string, sizeof(string), ""SC"Reakcije: "DGREEN"Cestitam! "GREY"Bio si najbrzi i osvojio "DGREEN"%d$.", xCash);
SendClientMessage(playerid, -1, string);
g_NovacPlus(playerid, xCash);
SetPlayerScore(playerid, GetPlayerScore(playerid));
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
xTestBusy = false; } } }
return 1;
}
//////////////////////////////////////////////////////////////////////////////
forward xReactionProgress();
public xReactionProgress()
{
switch(xTestBusy) {
case true: {
new string ;
format(string, sizeof(string), ""SC"Reakcije: "GREY"Niko nije napisao rec kako treba!", (TIME/60000));
SendClientMessageToAll(-1, string);
xReactionTimer = SetTimer("xReactionTest", TIME, 1); } }
return 1;
}
//----------------------------------------------------------------------------//
forward xReactionTest();
public xReactionTest()
{
new xLength = (random(8) + 2), string ;
xCash = (random(2000));
format(xChars, sizeof(xChars), "");
Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s", xChars, xCharacters[random(sizeof(xCharacters))]);
format(string, sizeof(string), ""SC"Reakcije: "GREY"Igra je pocela! Ko prvi upise "WHITE"%s "GREY"osvaja "DGREEN"%d$.", xChars, xCash);
SendClientMessageToAll(-1, string);
KillTimer(xReactionTimer);
xTestBusy = true;
SetTimer("xReactionProgress", 30000, 0);
return 1;
}Slika (neobavezno): http://i.imgur.com/GebviEv.png
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
131
Postovi:
23
Teme:
Pridružio se:Jan. 2014
13. Jul 2015.
Vuzimir wrote on July 13, 2015, 9:44 am:
ja sam bas sada skinuo to sa neta i ubacio kod sebe u mod i sve perfekno radi, najvjerovatnije da ti je nesto omaklo kada si prebacivao...
EDIT: da nisam ovde mozda pogresio ?
new xCharacters[][] =
{
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
},
xChars = "",
xReactionTimer,
xCash,
bool: xTestBusy;
#define Loop(%0,%1) for(new %0 = 0; %0 != %1; %0++)Kingpin
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,427
Postovi:
90
Teme:
Pridružio se:Okt. 2012
13. Jul 2015.
ae ovako dodaj:
na vrh:
pod OnGameModeInit:
Pod OnGameModeExit:
Pod OnPlayerText znaci na vrh tog publica:
na dno skripte:
na vrh:
#if !defined Loop
#define Loop(%0,%1) \
for(new %0 = 0; %0 != %1; %0++)
#endif
#if !defined function
#define function%0(%1) \
forward%0(%1); public%0(%1)
#endif
#if !defined PURPLE
#define PURPLE \
0xBF60FFFF
#endif
#if !defined GREEN
#define GREEN \
0x94D317FF
#endif
#if !defined TIME
#define TIME \
180000
#endif
new
xCharacters[][] =
{
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
},
xChars = "",
xReactionTimer,
xCash,
xScore,
bool: xTestBusy
;pod OnGameModeInit:
xReactionTimer = SetTimer("xReactionTest", TIME, 1);Pod OnGameModeExit:
KillTimer(xReactionTimer);Pod OnPlayerText znaci na vrh tog publica:
switch(xTestBusy)
{
case true:
{
if(!strcmp(xChars, text, false))
{
new
string,
pName
;
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "« \%s\" has won the reaction test. »", pName);
SendClientMessageToAll(GREEN, string);
format(string, sizeof(string), "« You have earned $%d + %d score points. »", xCash, xScore);
SendClientMessage(playerid, GREEN, string);
GivePlayerMoney(playerid, xCash);
SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
xTestBusy = false;
}
}
}na dno skripte:
function xReactionProgress()
{
switch(xTestBusy)
{
case true:
{
new
string
;
format(string, sizeof(string), "« No-one won the reaction-test. New one starting in %d minutes. »", (TIME/60000));
SendClientMessageToAll(PURPLE, string);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
}
}
return 1;
}
function xReactionTest()
{
new
xLength = (random(8) + 2),
string
;
xCash = (random(10000) + 20000);
xScore = (random(2)+1);
format(xChars, sizeof(xChars), "");
Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s", xChars, xCharacters[random(sizeof(xCharacters))]);
format(string, sizeof(string), "« Who first types %s wins $%d + %d score points. »", xChars, xCash, xScore);
SendClientMessageToAll(PURPLE, string);
KillTimer(xReactionTimer);
xTestBusy = true;
SetTimer("xReactionProgress", 30000, 0);
return 1;
}Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
131
Postovi:
23
Teme:
Pridružio se:Jan. 2014
13. Jul 2015.
Vuzimir wrote on July 13, 2015, 11:00 am:
ae ovako dodaj:
na vrh:
pod OnGameModeInit:
Pod OnGameModeExit:
Pod OnPlayerText znaci na vrh tog publica:
na dno skripte:
na vrh:
#if !defined Loop
#define Loop(%0,%1) \
for(new %0 = 0; %0 != %1; %0++)
#endif
#if !defined function
#define function%0(%1) \
forward%0(%1); public%0(%1)
#endif
#if !defined PURPLE
#define PURPLE \
0xBF60FFFF
#endif
#if !defined GREEN
#define GREEN \
0x94D317FF
#endif
#if !defined TIME
#define TIME \
180000
#endif
new
xCharacters[][] =
{
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
},
xChars = "",
xReactionTimer,
xCash,
xScore,
bool: xTestBusy
;pod OnGameModeInit:
xReactionTimer = SetTimer("xReactionTest", TIME, 1);Pod OnGameModeExit:
KillTimer(xReactionTimer);Pod OnPlayerText znaci na vrh tog publica:
switch(xTestBusy)
{
case true:
{
if(!strcmp(xChars, text, false))
{
new
string,
pName
;
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "« \%s\" has won the reaction test. »", pName);
SendClientMessageToAll(GREEN, string);
format(string, sizeof(string), "« You have earned $%d + %d score points. »", xCash, xScore);
SendClientMessage(playerid, GREEN, string);
GivePlayerMoney(playerid, xCash);
SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
xTestBusy = false;
}
}
}na dno skripte:
function xReactionProgress()
{
switch(xTestBusy)
{
case true:
{
new
string
;
format(string, sizeof(string), "« No-one won the reaction-test. New one starting in %d minutes. »", (TIME/60000));
SendClientMessageToAll(PURPLE, string);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
}
}
return 1;
}
function xReactionTest()
{
new
xLength = (random(8) + 2),
string
;
xCash = (random(10000) + 20000);
xScore = (random(2)+1);
format(xChars, sizeof(xChars), "");
Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s", xChars, xCharacters[random(sizeof(xCharacters))]);
format(string, sizeof(string), "« Who first types %s wins $%d + %d score points. »", xChars, xCash, xScore);
SendClientMessageToAll(PURPLE, string);
KillTimer(xReactionTimer);
xTestBusy = true;
SetTimer("xReactionProgress", 30000, 0);
return 1;
}Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
131
Postovi:
23
Teme:
Pridružio se:Jan. 2014
13. Jul 2015.
Vuzimir wrote on July 13, 2015, 11:30 am:
samo tako dodas... posto gore ti je defajnovano to function
EDIT:Radi sve dodao sam ovo forward sve radi i reakcije hvala Vuzi moze lock 🙂
forward xReactionProgress();
public xReactionProgress()
forward xReactionTest();
public xReactionTest()Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava
