60 Second Textdraw countdown.
#1

Hey there basicaly i have mapped out a go kart track and i want it so that is displays a 60 second countdown with textdraw at the bottom of the screen and also may i ask how i would get "playerid" to work with my timer as it wont work with playerid this is my timer code:
Код:
// this is the forward/ect part
forward karttimer();

// This is the public part 
public karttimer()
{
  new pname[24], string[128];
  GetPlayerName(playerid, pname, sizeof(pname));
  format(string, sizeof(string), "%s Has failed to compleat the kart track within 1 minute.", pname);
  SendClientMessageToAll(0x33AA33AA, string);
}
Reply
#2

To get the playerid you need SetTimerEx instead of SetTimer.

Example:

pawn Код:
// this is the forward/ect part
forward karttimer(playerid);

//this goes in your code
SetTimerEx("karttimer", 60000, 0, "i", playerid);

// This is the public part
public karttimer(playerid)
{
  new pname[24], string[128];
  GetPlayerName(playerid, pname, sizeof(pname));
  format(string, sizeof(string), "%s Has failed to compleat the kart track within 1 minute.", pname);
  SendClientMessageToAll(0x33AA33AA, string);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)