Loading ...
#1

Hey guys emm what is wrong because i can't find a way to solve this....

pawn Код:
public Loading(playerid)
{
TogglePlayerControllable(playerid,0);
 GameTextForPlayer(playerid, "~b~Loading ~g~Map ~w~Please Wait..",3000,5);
SetTimer("LoadingFinshed",2000,0);
return 1;
}

public LoadingFinished(playerid)
{
TogglePlayerControllable(playerid,1);
return 1;
}
i am using loading system..to freeze players for 2 seconds so the map will load..i used this onPlayerSpawn callback.
however it is not unfreezing the player after 2 seconds the play remains frozen..what i should do

P.S:i have made that with SetTimerEx...
Reply
#2

Use this under onplayerspawn?
pawn Код:
TogglePlayerControllable(playerid,0);
 GameTextForPlayer(playerid, "~b~Loading ~g~Map ~w~Please Wait..",3000,5);
SetTimer("LoadingFinshed",2000,0)
Reply
#3

doesnt work..pff i can't understand this..to my old gamemode it was working..prbbly problem with 0.3d.?
Reply
#4

Try using this:
pawn Код:
stock LoadPlayer(playerid)
{
    SetTimerEx("Loading", 3000, false, "i", playerid);
    GameTextForPlayer(playerid, "Loading environment Please wait", 3000, 5);
    TogglePlayerControllable(playerid, 0);
    return 1;
}
forward Loading(playerid);
public Loading(playerid)
{
    TogglePlayerControllable(playerid, 1);
    GameTextForPlayer(playerid, "Loaded", 3000, 5);
    return 1;
}

//Put this under OnPlayerSpawn
LoadPlayer(playerid);
Reply
#5

working +rep thanks man i couldnt understand however..on my old gamemode i was using public ...and it was working as well..thanks .
Reply
#6

No problem! Dont hestitate to ask help from me!
Reply
#7

It didt work becouse you used SetTimer and it didn't pass the "playerid" variable
And that's why the end func didn work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)