[HELP]Reaction TK Points - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP]Reaction TK Points (
/showthread.php?tid=566944)
[HELP]Reaction TK Points -
Markoni990 - 09.03.2015
Hey I would like to make a reaction tk points but that we preserve the name of the player and tk points it should be this way as a picture
PHP код:
switch(xTestBusy)
{
case true:
{
if(!strcmp(xChars, text, false))
{
//new
//string[456],
new pName[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "{FF0000}[TK]{FFFFFF}Najbrzi je bio {FF0000}%s\" {FFFFFF}i osvaja nagradu od $%d i sada ima {FF0000}%d {FFFFFF}TK POENA. »", pName,xCash,xScore);
SendClientMessageToAll(COLOR_GRAD1, string);
format(string, sizeof(string), "{00FFFF}« Dobili ste $%d»", xCash);
SendClientMessage(playerid, COLOR_GRAD1, string);
GivePlayerMoney(playerid, 1500);
//PlayerInfo[playerid][pExp] += 1;
SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);
xReactionTimer = SetTimer("xReactionTest", TIMEE, 1);
xTestBusy = false;
//SavePlayer(playerid);
}
}
}
PHP код:
FUNCTION: xReactionTest()
{
new
xLength = (random(8) + 2),
string[128]
;
xCash = (random(574) + 228);
xScore = (random(1)+1);
format(xChars, sizeof(xChars), "");
Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s", xChars, xCharacters[random(sizeof(xCharacters))][0]);
format(string, sizeof(string), "{FF0000}[TK]{FFFFFF}Ko prvi upise u cetu {FF0000}%s{FFFFFF} dobija %d$. TRENUTNI REKORD: %i sek.", xChars, xCash, GetTimerInSeconds(GetTickCount()),xScore);
SendClientMessageToAll(PURPLE, string);
KillTimer(xReactionTimer);
xTestBusy = true;
SetTimer("xReactionProgress", 50000, 0);
return 1;
}
Respuesta: [HELP]Reaction TK Points -
Markoni990 - 09.03.2015
BUMP
Respuesta: [HELP]Reaction TK Points -
Markoni990 - 10.03.2015
BUMP
Re: [HELP]Reaction TK Points -
Schneider - 10.03.2015
There are many different file-writing systems (sa:mp's default, y_ini, dini, et cetra). Look up more information and tutorials to learn how to save and load info in/from a file.
Respuesta: [HELP]Reaction TK Points -
Markoni990 - 10.03.2015
enum pInfo
{
pTKPoint,
}
PlayerInfo[MAX_PLAYERS][pInfo];
Respuesta: [HELP]Reaction TK Points -
Markoni990 - 11.03.2015
BUMP