public OnPlayerRequestClass(playerid, classid) { bloquear_chat = false; TogglePlayerSpectating(playerid, true); SetTimer("Loading",5000,false); return 1; }
forward Loading(playerid); public Loading(playerid) { new Str1[128], Str2[128], Str3[128], Str4[128]; new Str5[128], Str6[128]; TextDrawShowForPlayer(playerid, ImagemEntrada); TextDrawShowForPlayer(playerid, FUNDO1); TextDrawShowForPlayer(playerid, FUNDO2); TextDrawShowForPlayer(playerid, FUNDO3); TextDrawShowForPlayer(playerid, FUNDOPLAY1); TextDrawShowForPlayer(playerid, FUNDOPLAY2); TextDrawShowForPlayer(playerid, PLAYSOLO); TextDrawShowForPlayer(playerid, FUNDOSKIN1); TextDrawShowForPlayer(playerid, FUNDOSKIN2); TextDrawShowForPlayer(playerid, SKIN); TextDrawShowForPlayer(playerid, TXTNICK); TextDrawShowForPlayer(playerid, TXTLEVEL); TextDrawShowForPlayer(playerid, TXTKILLS); TextDrawShowForPlayer(playerid, TXTDEATHS); TextDrawShowForPlayer(playerid, TXTWINS); TextDrawShowForPlayer(playerid, FUNDODUPLA1); TextDrawShowForPlayer(playerid, FUNDODUPLA2); TextDrawShowForPlayer(playerid, PLAYDUO); TextDrawShowForPlayer(playerid, FUNDOSQUAD1); TextDrawShowForPlayer(playerid, FUNDOSQUAD2); TextDrawShowForPlayer(playerid, PLAYSQUAD); TextDrawShowForPlayer(playerid, GTA); TextDrawShowForPlayer(playerid, SANROYALE); TextDrawShowForPlayer(playerid, VERSION); TextDrawShowForPlayer(playerid, TCCPROJECT); TextDrawShowForPlayer(playerid, TXTDINHEIRO); SelectTextDraw(playerid, 0xFFFF00FF); format(Str1,sizeof(Str1),"Nick:______%s",PlayerInfo[playerid][pNome]); format(Str2,sizeof(Str2),"LEVEL:_________________%d",PlayerInfo[playerid][pLevel]); format(Str3,sizeof(Str3),"Matou:________________%d",PlayerInfo[playerid][pMatou]); format(Str4,sizeof(Str4),"Morreu:______________%d",PlayerInfo[playerid][pMorreu]); format(Str5,sizeof(Str5),"vitorias:____________%d",PlayerInfo[playerid][pVitorias]); format(Str6,sizeof(Str6),"$%d",PlayerInfo[playerid][pDinheiro]); TextDrawSetString(TXTNICK,Str1); TextDrawSetString(TXTLEVEL,Str2); TextDrawSetString(TXTKILLS,Str3); TextDrawSetString(TXTDEATHS,Str4); TextDrawSetString(TXTWINS,Str5); TextDrawSetString(TXTDINHEIRO,Str6); PlayAudioStreamForPlayer(playerid, "https://dl.dropboxusercontent.com/s/9lesgz73pl25lks/NYAN%20CAT%20instrumental%20HD.mp3?dl=0"); for(new i=0; i < 100; i++) { SendClientMessage(playerid, COLOR_GRAD1, " "); } return 1; }
SetTimer й sem parвmetros, SetTimerEx com parвmetros.
Quando se quer definir algo para cada player se tratando de Timer se usa SetTimerEx. |
SetTimer("Loading",5000,false);
SetTimerEx("Loading", 5000, false, "d", playerid);
Altera isso:
pawn Код:
pawn Код:
|