[HELP]Timer - 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]Timer (
/showthread.php?tid=583381)
[SOLVED]Timer -
jamesmith12 - 28.07.2015
CODE
PHP код:
//OnGameModeInit
SetTimer("scoretimer", 1000, true);
PHP код:
//OnPlayerConnect
forward scoretimer(playerid);
public scoretimer()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new prank[128];
format(prank, sizeof(prank), "Rank : %s" ,GetRankName(i));
PlayerTextDrawShow(playerid ,Textdraw2[i], prank);
}
}
}
Error
Код:
F:\SAMP\gamemodes\MOD.pwn(1686) : error 029: invalid expression, assumed zero
F:\SAMP\gamemodes\MOD.pwn(1686) : error 017: undefined symbol "scoretimer"
F:\SAMP\gamemodes\MOD.pwn(1687) : error 029: invalid expression, assumed zero
F:\SAMP\gamemodes\MOD.pwn(1687) : error 017: undefined symbol "scoretimer"
F:\SAMP\gamemodes\MOD.pwn(1695) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Re: [HELP]Timer -
jamesmith12 - 28.07.2015
Hi bro
PHP код:
Error :
warning 202: number of arguments does not match definition
Error line :
PlayerTextDrawShow(playerid,Textdraw2[i], prank);
Re: [HELP]Timer -
DarkLored - 28.07.2015
you can't use the prank inside it, it should be like this
pawn Код:
PlayerTextDrawShow(playerid,Textdraw2[i]);
if you want it to use a format, you need to use this
https://sampwiki.blast.hk/wiki/TextDrawSetString
Re: [HELP]Timer -
jamesmith12 - 28.07.2015
thanks