Can't see gametextforplayer
#1

pawn Код:
forward WaitTimer(playerid, waittime);

forward one(playerid);
forward two(playerid);
forward three(playerid);
forward start(playerid);


YCMD:test1(playerid, params[], help)
{
    #pragma unused params
    #pragma unused help
    WaitTimer(playerid, 2000);
    return 1;
}


public WaitTimer(playerid,waittime)
{
   
    SetTimerEx("three", waittime,0,"i",playerid);
    SetTimerEx("two", waittime+waittime, 0,"i",playerid);
    SetTimerEx("one", waittime+waittime+waittime, 0,"i",playerid);
    SetTimerEx("start", waittime+waittime+waittime+waittime, 0,"i",playerid);
   
}


public three(playerid)
{
   TogglePlayerControllable(playerid, 0);
   GameTextForPlayer(playerid,"Loading",2000,2);
   return 1;
}

public two(playerid)
{
   GameTextForPlayer(playerid,"Loading.",2000,2);
   return 1;
}

public one(playerid)
{
   GameTextForPlayer(playerid,"Loading. .",2000,2);
   return 1;
}

public start(playerid)
{
   TogglePlayerControllable(playerid, 1);
   GameTextForPlayer(playerid,"Loading . . .",3000,2);
   return 1;
}
For some reason i can't see GameTextForPlayer. Maybe there is a better way to make such script?
Reply
#2

pawn Код:
if (strcmp(cmdtext, "/countdown", true) || !strcmp(cmdtext, "/count", true))
        {
        if(Count >= 5)
        {
        SendClientMessageToAll(COLOR_GREEN, "[SUCCES]> Countdown is started");
        CountDown();
        return 1;
        }else{
        SendClientMessage(playerid, COLOR_YELLOW, "[ERROR]> Sorry, Countdown is progress....");
        return 1;
        }
You will define the COLOR_YELLOW AND THE COLOR_GREEN cuz im too lazy
Reply
#3

Quote:
Originally Posted by zombieking
Посмотреть сообщение
pawn Код:
if (strcmp(cmdtext, "/countdown", true) || !strcmp(cmdtext, "/count", true))
        {
        if(Count >= 5)
        {
        SendClientMessageToAll(COLOR_GREEN, "[SUCCES]> Countdown is started");
        CountDown();
        return 1;
        }else{
        SendClientMessage(playerid, COLOR_YELLOW, "[ERROR]> Sorry, Countdown is progress....");
        return 1;
        }
You will define the COLOR_YELLOW AND THE COLOR_GREEN cuz im too lazy
I don't think that's the problem
Reply
#4

Ok then try this:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_FIRE)
    {
        GameTextForPlayer(playerid,"~r~1",500,5);
    }
    if(newkeys & KEY_JUMP)
    {
        GameTextForPlayer(playerid,"~w~2",500,5);
        }
    if(newkeys & KEY_WALK)
    {
        GameTextForPlayer(playerid,"~g~3",500,5);
        }

    if(newkeys & KEY_ACTION)
    {
        GameTextForPlayer(playerid,"~w~START",500,5);
        }
    return 1;
}
In this way you must:
Press LMB to show 1
Press LSHIFT to show 2
Press LALT(Walk key) to show 3
Press TAB to show START

Pressing LMB(which show 1) , LSHIFT(which show 2) , LALT(which show 3) , TAB (which show START) will initiate an easy countdown which you can do everytime without any command
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)