need help urgent for my server.
#1

make it for playerid not for all

PHP код:
forward CountDownRobbery(time);
public 
CountDownRobbery(time) {
    if(
time 1) {
        
GameTextForAll("~r~Robbery complete"25001);
    } else {
        new
            
str[128]
        ;
        
format(strsizeof str"%d seconds remaining~n~~r~Do not move until the~n~Robbery is completed"time);
        
GameTextForAll(str10001);
        
SetTimerEx("CountDownRobbery"1000false"i", --time);
    }

Reply
#2

You need to pass 'playerid' to the timer also, not just 'time'. The script can't guess which player you want to show gametext to!
Reply
#3

i cant make like this? GameTextForPlayer?
Reply
#4

Try this

pawn Код:
forward CountDownRobbery(time, playerid);
public CountDownRobbery(time, playerid) {
    if(time < 1) {
        GameTextForPlayer(playerid, "~r~Robbery complete", 2500, 1);
    } else {
        new
            str[128]
        ;
        format(str, sizeof str, "%d seconds remaining~n~~r~Do not move until the~n~Robbery is completed", time);
        GameTextForPlayer(playerid, str, 1000, 1);

        SetTimerEx("CountDownRobbery", 1000, false, "i", --time);
    }
}
Reply
#5

Quote:
Originally Posted by Sasoft
Посмотреть сообщение
Try this

pawn Код:
forward CountDownRobbery(time, playerid);
public CountDownRobbery(time, playerid) {
    if(time < 1) {
        GameTextForPlayer(playerid, "~r~Robbery complete", 2500, 1);
    } else {
        new
            str[128]
        ;
        format(str, sizeof str, "%d seconds remaining~n~~r~Do not move until the~n~Robbery is completed", time);
        GameTextForPlayer(playerid, str, 1000, 1);

        SetTimerEx("CountDownRobbery", 1000, false, "i", --time);
    }
}
got 30 same error: warning 202: number of arguments does not match definition another way?
Reply
#6

You must edit your CountDownRobbery timers to the correct format.
(time) (playerid)
pawn Код:
SetTimerEx("CountDownRobbery", 1000, playerid, false, "i", --time);
Reply
#7

(7837) : error 035: argument type mismatch (argument 4)

7837: SetTimerEx("CountDownRobbery", 1000, playerid, false, "i", --time);
Reply
#8

well, someone help me
Reply
#9

my server is on running someone help me?
Reply
#10

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)