20.05.2016, 22:25
Sup guys after starting updating and working back on my gamemode ,
started to have trouble with TextDraws
so here are some codes
Yes those are clicable when You class request !
Those when player spawns
and those codes when u click the textdraw
so the problem its when i try to click First/ Second Textdraw Lobby 1 or lobby 2 it wont spawn the player where he selected
OnPlayerSpawn
there is what mode you pick etc etc
~ Sorry my bad english
hope anyone can help me
and yes its a mult gamemode
started to have trouble with TextDraws
so here are some codes
Yes those are clicable when You class request !
Quote:
public OnPlayerRequestClass(playerid, classid) { TextDrawShowForPlayer(playerid, Text:Lobby[0]); TextDrawShowForPlayer(playerid, Text:Lobby[1]); TextDrawShowForPlayer(playerid, Text:Lobby[2]); TextDrawShowForPlayer(playerid, Text:Lobby[3]); TextDrawShowForPlayer(playerid, Text:Lobby[4]); TextDrawShowForPlayer(playerid, Text:Lobby[5]); TextDrawShowForPlayer(playerid, Text:Lobby[6]); TextDrawShowForPlayer(playerid, Text:Lobby[7]); TextDrawShowForPlayer(playerid, Text:Lobby[8]); TextDrawShowForPlayer(playerid, Text:Lobby[9]); TextDrawShowForPlayer(playerid, Text:Lobby[10]); SelectTextDraw(playerid, 0xA3B4C5FF); ////////////////////////////////////////// SetPlayerPos(playerid, 661.6200,-820.1381,86.5092); SetPlayerFacingAngle(playerid, 227.2857); SetPlayerCameraLookAt(playerid, 661.6200,-820.1381,86.5092); SetPlayerCameraPos(playerid, 673.1569,-826.9614,80.5580); CreateObject(2780,658.29999,-814.70001,85.6,0.0,0.0,0.0); RemoveBuildingForPlayer(playerid, 705, 658.20313, -818.14062, 85.13281, 0.0); return 1; } |
Код HTML:
public OnPlayerSpawn(playerid) { if(mode[playerid] == 1) { SetPlayerPos(playerid,3528.89990234,1239.19995117,30.20000076); SendClientMessage(playerid,-1,"Welcome to TDM Mode. Mode Cmds: /shop /kill /rules /cmds"); GivePlayerWeapon(playerid,24,10000); GivePlayerWeapon(playerid,25,23242); GivePlayerWeapon(playerid,30,10000); GivePlayerWeapon(playerid,29,10000); GivePlayerWeapon(playerid,34,10000); SetPlayerArmour(playerid,50); } else if(mode[playerid] == 2) { SetPlayerPos(playerid,3362.1589355469,-2069.42578125,46.729736328125); SendClientMessage(playerid,-1,"Welcome to Stunt Mode. Mode Cmds: /nos /kill /rules /cmds"); ShowPlayerDialog(playerid,DIALOG_STUNT, DIALOG_STYLE_LIST, "Stunt Cars", "Infernus\nBravura\nBuffalo\nMule\nCheetah\nVIP Turismo","Select", ""); } return 1; }
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid) { if(clickedid == Lobby[1]) //If player click DM textdraw { mode[playerid] = 1; PlayerInfo[playerid][pDM]++; SpawnPlayer(playerid); SetPlayerScore(playerid, PlayerInfo[playerid][pDMScore]); //SetPlayerPos(playerid, 1630.2030,-2328.9673,13.5469); //Pos } else if(clickedid == Lobby[3]) // If clicked STUNT { SetPlayerPos(playerid, -1424.6083, -290.9622, 14.1484); // Pos } else if(clickedid == Lobby[2]) //If click TDM ! { SetPlayerPos(playerid, 1688.7990, 1447.7753, 10.7675); // Pos } else if(clickedid == Lobby[4]) { } TextDrawHideForPlayer(playerid, Text:Lobby[0]); TextDrawHideForPlayer(playerid, Text:Lobby[1]); TextDrawHideForPlayer(playerid, Text:Lobby[2]); TextDrawHideForPlayer(playerid, Text:Lobby[3]); TextDrawHideForPlayer(playerid, Text:Lobby[4]); TextDrawHideForPlayer(playerid, Text:Lobby[5]); TextDrawHideForPlayer(playerid, Text:Lobby[6]); TextDrawHideForPlayer(playerid, Text:Lobby[7]); TextDrawHideForPlayer(playerid, Text:Lobby[8]); TextDrawHideForPlayer(playerid, Text:Lobby[9]); TextDrawHideForPlayer(playerid, Text:Lobby[10]); CancelSelectTextDraw(playerid); // Everything worked out perfectly, now stop the player to be able to select shizzle. return 1; }
OnPlayerSpawn
there is what mode you pick etc etc
~ Sorry my bad english
hope anyone can help me
and yes its a mult gamemode