Please Help
#1

I Have Creat textedraw and i've add it OnPlayerSpawn im Just Asking How to do time for enable the Texte draw
Becaue I Wanna it When PlayerSpawn he Show it For 10s and he Disable Please help me
Reply
#2

You should show the textdraw for the player when he/she spawns then set a timer for it.

Like this:
pawn Код:
public OnPlayerSpawn(playerid)
{
     TextDrawShowForPlayer(playerid,/*YourTextDraw'sName*/);
     SetTimer("hideTextdraw",10000,false);
     return 1;
}
pawn Код:
forward hideTextdraw(playerid);
public hideTextdraw(playerid)
{
     TextDrawHideForPlayer(playerid,/*YourTextDraw'sName*/);
     return 1;
}
Reply
#3

Quote:
Originally Posted by iFiras
Посмотреть сообщение
You should show the textdraw for the player when he/she spawns then set a timer for it.

Like this:
pawn Код:
public OnPlayerSpawn(playerid)
{
     TextDrawShowForPlayer(playerid,/*YourTextDraw'sName*/);
     SetTimer("hideTextdraw",10000,false);
     return 1;
}
pawn Код:
forward hideTextdraw(playerid);
public hideTextdraw(playerid)
{
     TextDrawHideForPlayer(playerid,/*YourTextDraw'sName*/);
     return 1;
}
Just some improvements and corrections.

pawn Код:
public OnPlayerSpawn(playerid)
{
     TextDrawShowForPlayer(playerid, /*TEXTDRAW_NAME*/);
     SetTimerEx("HideTextdraw", 10000, false, "i", playerid);
     return 1;
}

forward public HideTextdraws(playerid); TextDrawHideForPlayer(playerid, /*TEXTDRAW_NAME*/);
Reply
#4

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Just some improvements and corrections.

pawn Код:
public OnPlayerSpawn(playerid)
{
     TextDrawShowForPlayer(playerid, /*TEXTDRAW_NAME*/);
     SetTimerEx("HideTextdraw", 10000, false, "i", playerid);
     return 1;
}

forward public HideTextdraws(playerid); TextDrawHideForPlayer(playerid, /*TEXTDRAW_NAME*/);
Even more improvements and corrections:
pawn Код:
public OnPlayerSpawn(playerid)
{
     TextDrawShowForPlayer(playerid, /*TD Name*/);
     SetTimerEx("HideTextdraws", 10000, false, "i", playerid);
     return 1;
}

forward HideTextdraws(playerid);
public HideTextdraws(playerid) return TextDrawHideForPlayer(playerid, /*TD Name*/);
Reply
#5

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Even more improvements and corrections:
pawn Код:
public OnPlayerSpawn(playerid)
{
     TextDrawShowForPlayer(playerid, /*TD Name*/);
     SetTimerEx("HideTextdraws", 10000, false, "i", playerid);
     return 1;
}

forward HideTextdraws(playerid);
public HideTextdraws(playerid) return TextDrawHideForPlayer(playerid, /*TD Name*/);
A friend told me that you can define it like this:

pawn Код:
forward public HideTextdraws(playerid);
I just tried it but it didn't work.
Reply
#6

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
A friend told me that you can define it like this:

pawn Код:
forward public HideTextdraws(playerid);
I just tried it but it didn't work.
Your friend is right, here's an example:

PHP код:
forward public a(somevalue);
public 
a(somevalue)
{
    
printf("%d"somevalue);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)