[Help]Score System - 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]Score System (
/showthread.php?tid=354412)
[Help]Score System -
kbalor - 26.06.2012
I want to change 60 seconds to 30 mins. how? i think its not just SetTimer("scoretimer", 1000, true);
PHP код:
new seconds[MAX_PLAYERS];
public OnGameModeInit()
{
SetTimer("scoretimer", 1000, true);
return 1;
}
public OnPlayerConnect(playerid)
{
seconds[playerid] = 0;
return 1;
}
forward scoretimer();
public scoretimer()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
seconds[i] ++;
if(seconds[i] == 60)
{
SetPlayerScore(i, GetPlayerScore(i) + 1);
seconds[i] = 0;
}
}
return 1;
}
Also after typing in chat. My id doesnt show after my name.
Re: [Help]Score System -
tyler12 - 26.06.2012
pawn Код:
new seconds[MAX_PLAYERS];
public OnGameModeInit()
{
SetTimer("scoretimer", 1000, true);
return 1;
}
public OnPlayerConnect(playerid)
{
seconds[playerid] = 0;
return 1;
}
forward scoretimer();
public scoretimer()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
seconds[i] ++;
if(seconds[i] == 1800)
{
SetPlayerScore(i, GetPlayerScore(i) + 1);
seconds[i] = 0;
}
}
return 1;
}
EDIT: LOOOOOOOOOL @ SIGNATURE!!!!!
Re: [Help]Score System -
kbalor - 26.06.2012
Quote:
Originally Posted by tyler12
pawn Код:
new seconds[MAX_PLAYERS]; public OnGameModeInit() { SetTimer("scoretimer", 1000, true); return 1; } public OnPlayerConnect(playerid) { seconds[playerid] = 0; return 1; }
forward scoretimer(); public scoretimer() { for(new i; i<MAX_PLAYERS; i++) { if(!IsPlayerConnected(i)) continue; seconds[i] ++; if(seconds[i] == 1800) { SetPlayerScore(i, GetPlayerScore(i) + 1); seconds[i] = 0; } } return 1; }
EDIT: LOOOOOOOOOL @ SIGNATURE!!!!!
|
Lol i supposed to edit the SetTimer("scoretimer", 1000, true); to 1800 or something if you ddint show me.
@signature just a spam
EDIT: Can you help me with Id number? In chat my id number is not showing up!
Re: [Help]Score System -
ViniBorn - 26.06.2012
pawn Код:
SetTimer("scoretimer", 1000, true); // 1 second
SetTimer("scoretimer", 1000*60, true); // 1 minute
SetTimer("scoretimer", 1000*60*30, true); // 30 minutes
Re: [Help]Score System -
kbalor - 26.06.2012
Quote:
Originally Posted by Viniborn
pawn Код:
SetTimer("scoretimer", 1000, true); // 1 second
SetTimer("scoretimer", 1000*60, true); // 1 minute
SetTimer("scoretimer", 1000*60*30, true); // 30 minutes
|
This mean i will wait 30mins to get 1 score??
And your answer is different from tyler.