03.07.2017, 03:33
Hola a todos, pasa que tengo estos textdraws cambiantes cada 1 segundo y funciona bien pero siempre aparece al conectarse, como puedo hacer que salga en el OnPlayerRequestSpawn?? He intentado con TextDrawHideForPlayer en onplayerconnect, etc, pero no funciona xd
Код:
//TEXTDRAW TEXTDRAWS CAMBIANTES #include <a_samp> //-TEXTDRAW /COMANDOS CONTEO-// #define conteocomandos 19 #define msc 1500 //-BOX-COMANDOS-// new Text:BoxCMDS, // Caja cmds Text:TextoComandos; // /Comandos //-TEXTDRAW /COMANDOS-// new TextComandosCount = 0; forward ChangeTextDraw(); forward ChangeTextComandos(text[]); public OnGameModeInit() { //-BOX-COMANDOS-// BoxCMDS = TextDrawCreate(91.000000, 435.000000, "_"); TextDrawBackgroundColor(BoxCMDS, 190); TextDrawFont(BoxCMDS, 1); TextDrawLetterSize(BoxCMDS, 0.500000, 6.599999); TextDrawColor(BoxCMDS, -1); TextDrawSetOutline(BoxCMDS, 0); TextDrawSetProportional(BoxCMDS, 1); TextDrawSetShadow(BoxCMDS, 1); TextDrawUseBox(BoxCMDS, 1); TextDrawBoxColor(BoxCMDS, 140); TextDrawTextSize(BoxCMDS, -29.000000, 20.000000); TextoComandos = TextDrawCreate(3.000000, 437.000000, "/Comandos"); TextDrawBackgroundColor(TextoComandos, 255); TextDrawFont(TextoComandos, 2); TextDrawLetterSize(TextoComandos, 0.330000, 0.899999); TextDrawColor(TextoComandos, -1); TextDrawSetOutline(TextoComandos, 1); TextDrawSetProportional(TextoComandos, 1); TextDrawSetShadow(TextoComandos, 1); SetTimer("ChangeTextDraw",msc,1); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); return 1; } public OnPlayerConnect(playerid) { return 1; } //-TEXTDRAW /COMANDOS-// public ChangeTextComandos(text[]){ TextDrawHideForAll(TextoComandos); TextDrawSetString(TextoComandos,text); TextDrawShowForAll(TextoComandos); return 1;} public ChangeTextDraw() { if(TextComandosCount > conteocomandos) TextComandosCount = 0; switch(TextComandosCount) { case 0:{ChangeTextComandos("~w~/vips");} case 1:{ChangeTextComandos("~w~/comandos");} case 2:{ChangeTextComandos("~w~/autos");} case 3:{ChangeTextComandos("~w~/funciones");} case 4:{ChangeTextComandos("~w~/ayuda");} case 5:{ChangeTextComandos("~w~/cclase");} case 6:{ChangeTextComandos("~w~/reportar");} case 7:{ChangeTextComandos("~w~/admins");} case 8:{ChangeTextComandos("~w~/armas");} case 9:{ChangeTextComandos("~w~/reglas");} case 10:{ChangeTextComandos("~w~/creditos");} case 11:{ChangeTextComandos("~w~/entrar");} case 12:{ChangeTextComandos("~w~/ir");} case 13:{ChangeTextComandos("~w~/vcmds");} case 14:{ChangeTextComandos("~w~/fps");} case 15:{ChangeTextComandos("~w~/afk");} case 16:{ChangeTextComandos("~w~/items");} case 17:{ChangeTextComandos("~w~/clases");} case 18:{ChangeTextComandos("~w~/radio");} } TextComandosCount++; }