SA-MP Forums Archive
TextDraw - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: TextDraw (/showthread.php?tid=111799)



TextDraw - NewbieBoy - 04.12.2009

See the picture....



What is the code for that TextDraw when someone is on the checkpoint(Marker)?

Example : CJ is placing the bomb.It takes 10 seconds.




Re: TextDraw - GTAguillaume - 04.12.2009

On the top of your script:
pawn Код:
new Text:bomb;
new timerbomb[MAX_PLAYERS];
forward bombdone(playerid);
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    bomb = TextDrawCreate(50.0, 200.0,"Planting a bomb...");
    TextDrawShowForPlayer(playerid, bomb);
    timerbomb[playerid] = SetTimerEx("bombdone", 10000, false, "d", playerid);
    return 1;
}
pawn Код:
public OnPlayerLeaveCheckpoint(playerid)
{
    TextDrawHideForPlayer(playerid, bomb); //The person left the checkpoint
    KillTime(timerbomb[playerid]);
    SendClientMessage(playerid,0x00FF00AA,"You left the checkpoint, try again.");
    return 1;
}
pawn Код:
public bombdone(playerid)
{
    SendClientMessage(playerid,0x00FF00AA,"You planted succesfull the bomb.");
    TextDrawHideForPlayer(playerid, bomb);
    DisablePlayerCheckpoint(playerid);
    // ... other stuff ... //
    return 1;
}



Re: TextDraw - NewbieBoy - 04.12.2009

Thanks!


Re: TextDraw - GTAguillaume - 04.12.2009

Quote:
Originally Posted by AlphaPirate
Thanks!
No problem.