SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 09/01/2020, 10:15 AM   #1
C0stin
Little Clucker
 
Join Date: Dec 2019
Posts: 20
Reputation: 0
Default PayDay

pawn Code:
SetTimer("hidePayDayTD", 5000, false);
    return 1;
}

stock hidePayDayTD() {
    foreach(Player, i) {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1)
        PlayerTextDrawHie(i, PayDayTD);
        TextDrawHideForPlayer(i, PayDayBox);
        TextDrawHideForPlayer(i, PayDayTXT);
    }
    return 1;
}

I don't have any error, i wonder why the TXD doesn't disappear after 5 seconds..
C0stin is offline   Reply With Quote
Old 09/01/2020, 10:43 AM   #2
Vizi10
Huge Clucker
 
Join Date: May 2017
Location: Iran
Posts: 278
Reputation: 8
Default Re: PayDay

https://wiki.sa-mp.com/wiki/SetTimer

Use forward and public instead stock word.
Vizi10 is offline   Reply With Quote
Old 09/01/2020, 12:06 PM   #3
ShadowMortar
Big Clucker
 
ShadowMortar's Avatar
 
Join Date: Jul 2016
Location: Croatia
Posts: 139
Reputation: 20
Default Re: PayDay

PHP Code:
stock hidePayDayTD() {
    foreach(
Playeri) {
        if(
IsPlayerConnected(i) && gPlayerLogged[i] == 1)
        
PlayerTextDrawHie(iPayDayTD);
        
TextDrawHideForPlayer(iPayDayBox);
        
TextDrawHideForPlayer(iPayDayTXT);
    }
    return 
1;

Replace with:
PHP Code:
forward hidePayDayTD();
public 
hidePayDayTD() {
    foreach(
Playeri) {
        if(
IsPlayerConnected(i) && gPlayerLogged[i] == 1)
        
PlayerTextDrawHie(iPayDayTD);
        
TextDrawHideForPlayer(iPayDayBox);
        
TextDrawHideForPlayer(iPayDayTXT);
    }
    return 
1;

__________________
Quote:
Originally Posted by CheezIt View Post
Follow your heart and own style.
Feel free to PM me if you need help.
ShadowMortar is offline   Reply With Quote
Old 09/01/2020, 12:49 PM   #4
C0stin
Little Clucker
 
Join Date: Dec 2019
Posts: 20
Reputation: 0
Default Re: PayDay

Quote:
Originally Posted by Vizi10 View Post
https://wiki.sa-mp.com/wiki/SetTimer

Use forward and public instead stock word.
Quote:
Originally Posted by ShadowMortar View Post
PHP Code:
stock hidePayDayTD() {
    foreach(
Playeri) {
        if(
IsPlayerConnected(i) && gPlayerLogged[i] == 1)
        
PlayerTextDrawHie(iPayDayTD);
        
TextDrawHideForPlayer(iPayDayBox);
        
TextDrawHideForPlayer(iPayDayTXT);
    }
    return 
1;

Replace with:
PHP Code:
forward hidePayDayTD();
public 
hidePayDayTD() {
    foreach(
Playeri) {
        if(
IsPlayerConnected(i) && gPlayerLogged[i] == 1)
        
PlayerTextDrawHie(iPayDayTD);
        
TextDrawHideForPlayer(iPayDayBox);
        
TextDrawHideForPlayer(iPayDayTXT);
    }
    return 
1;

Both of them work, thank <3 I +rep you both.
C0stin is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Pedido] Sistema de payday quando vc e vip de dar 3 leveis a cada payday didimk157 PortuguÍs/Portuguese 8 26/06/2017 03:05 AM
Help payday Fjclip99 Scripting Help 8 25/06/2014 07:45 PM
[Ajuda] Bug Payday emersonpkaa PortuguÍs/Portuguese 1 19/05/2014 03:50 PM
[Ajuda] Bug no Payday emersonpkaa PortuguÍs/Portuguese 3 19/05/2014 01:33 PM
How can i increase the payday on My Server?? Included Payday Code Samieastwood Server Support 4 12/08/2013 07:41 AM


All times are GMT. The time now is 05:31 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.