09.12.2015, 15:49
I have a character selection textdraw and when two people are logging in the person sees the updates that are performed. Like there name and other stuff. How would I fix this?
Код:
if(i == 0) { format(pvarname,sizeof(pvarname),"tdempty%d",i); SetPVarInt(playerid, pvarname, 0); skinid2 = GetPVarInt(playerid, "SkinID0"); TextDrawSetPreviewModel(TDEditor_TD[8], skinid2); TextDrawSetString(TDEditor_TD[5], charname); } else if(i == 1) { format(pvarname,sizeof(pvarname),"tdempty%d",i); SetPVarInt(playerid, pvarname, 0); skinid = GetPVarInt(playerid, "SkinID1"); TextDrawSetPreviewModel(TDEditor_TD[9], skinid); TextDrawSetString(TDEditor_TD[6], charname); } else if(i == 2) { format(pvarname,sizeof(pvarname),"tdempty%d",i); SetPVarInt(playerid, pvarname, 0); skinid = GetPVarInt(playerid, "SkinID2"); TextDrawSetPreviewModel(TDEditor_TD[10], skinid); TextDrawSetString(TDEditor_TD[7], charname); } } TogglePlayerSpectating(playerid, 1); TextDrawShowForPlayer(playerid, TDEditor_TD[0]); TextDrawShowForPlayer(playerid, TDEditor_TD[1]); TextDrawShowForPlayer(playerid, TDEditor_TD[2]); TextDrawShowForPlayer(playerid, TDEditor_TD[3]); TextDrawShowForPlayer(playerid, TDEditor_TD[4]); TextDrawShowForPlayer(playerid, TDEditor_TD[5]); TextDrawShowForPlayer(playerid, TDEditor_TD[6]); TextDrawShowForPlayer(playerid, TDEditor_TD[7]); TextDrawShowForPlayer(playerid, TDEditor_TD[8]); TextDrawShowForPlayer(playerid, TDEditor_TD[9]); TextDrawShowForPlayer(playerid, TDEditor_TD[10]); SelectTextDraw(playerid, 0x2D2D2DFF);
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid) { new tdempty0, tdempty1, tdempty2; tdempty0 = GetPVarInt(playerid, "tdempty0"); tdempty1 = GetPVarInt(playerid, "tdempty1"); tdempty2 = GetPVarInt(playerid, "tdempty2"); if(_:clickedid != INVALID_TEXT_DRAW) { if(clickedid == TDEditor_TD[2]) { if(tdempty0 == 0) { chooseCharacter(playerid, 0); } else { showCharacterCreationDialog(playerid); } } else if(clickedid == TDEditor_TD[5]) { if(tdempty0 == 0) { chooseCharacter(playerid, 0); } else { showCharacterCreationDialog(playerid); } } else if(clickedid == TDEditor_TD[8]) { if(tdempty0 == 0) { chooseCharacter(playerid, 0); } else { showCharacterCreationDialog(playerid); } } else if(clickedid == TDEditor_TD[3]) { if(tdempty1 == 0) { chooseCharacter(playerid, 1); } else { showCharacterCreationDialog(playerid); } } else if(clickedid == TDEditor_TD[6]) { if(tdempty1 == 0) { chooseCharacter(playerid, 1); } else { showCharacterCreationDialog(playerid); } } else if(clickedid == TDEditor_TD[9]) { if(tdempty1 == 0) { chooseCharacter(playerid, 1); } else { showCharacterCreationDialog(playerid); } } else if(clickedid == TDEditor_TD[4]) { if(tdempty2 == 0) { chooseCharacter(playerid, 2); } else { showCharacterCreationDialog(playerid); } } else if(clickedid == TDEditor_TD[8]) { if(tdempty2 == 0) { chooseCharacter(playerid, 2); } else { showCharacterCreationDialog(playerid); } } else if(clickedid == TDEditor_TD[10]) { if(tdempty2 == 0) { chooseCharacter(playerid, 2); } else { showCharacterCreationDialog(playerid); } } CancelSelectTextDraw(playerid); TextDrawHideForPlayer(playerid, TDEditor_TD[0]); TextDrawHideForPlayer(playerid, TDEditor_TD[1]); TextDrawHideForPlayer(playerid, TDEditor_TD[2]); TextDrawHideForPlayer(playerid, TDEditor_TD[3]); TextDrawHideForPlayer(playerid, TDEditor_TD[4]); TextDrawHideForPlayer(playerid, TDEditor_TD[5]); TextDrawHideForPlayer(playerid, TDEditor_TD[6]); TextDrawHideForPlayer(playerid, TDEditor_TD[7]); TextDrawHideForPlayer(playerid, TDEditor_TD[8]); TextDrawHideForPlayer(playerid, TDEditor_TD[9]); TextDrawHideForPlayer(playerid, TDEditor_TD[10]); CancelSelectTextDraw(playerid); } return 1; }
Код:
//Login Textdraws TDEditor_TD[0] = TextDrawCreate(192.666778, 77.866661, "box"); TextDrawLetterSize(TDEditor_TD[0], 0.000000, 25.100002); TextDrawTextSize(TDEditor_TD[0], 475.000000, 0.000000); TextDrawAlignment(TDEditor_TD[0], 1); TextDrawColor(TDEditor_TD[0], -1); TextDrawUseBox(TDEditor_TD[0], 1); TextDrawBoxColor(TDEditor_TD[0], -2105376001); TextDrawSetShadow(TDEditor_TD[0], 0); TextDrawSetOutline(TDEditor_TD[0], 0); TextDrawBackgroundColor(TDEditor_TD[0], 255); TextDrawFont(TDEditor_TD[0], 1); TextDrawSetProportional(TDEditor_TD[0], 1); TextDrawSetShadow(TDEditor_TD[0], 0); TDEditor_TD[1] = TextDrawCreate(272.000122, 83.807411, "Los_Santos_Realism"); TextDrawLetterSize(TDEditor_TD[1], 0.400000, 1.600000); TextDrawAlignment(TDEditor_TD[1], 1); TextDrawColor(TDEditor_TD[1], -1); TextDrawSetShadow(TDEditor_TD[1], 0); TextDrawSetOutline(TDEditor_TD[1], 0); TextDrawBackgroundColor(TDEditor_TD[1], 255); TextDrawFont(TDEditor_TD[1], 1); TextDrawSetProportional(TDEditor_TD[1], 1); TextDrawSetShadow(TDEditor_TD[1], 0); TDEditor_TD[2] = TextDrawCreate(401.617187, 157.079666, "box"); TextDrawLetterSize(TDEditor_TD[2], 0.000000, 12.809001); TextDrawTextSize(TDEditor_TD[2], 462.500671, 0.000000); TextDrawAlignment(TDEditor_TD[2], 1); TextDrawColor(TDEditor_TD[2], -1); TextDrawUseBox(TDEditor_TD[2], 1); TextDrawBoxColor(TDEditor_TD[2], -1229539690); TextDrawSetShadow(TDEditor_TD[2], 0); TextDrawSetOutline(TDEditor_TD[2], 0); TextDrawBackgroundColor(TDEditor_TD[2], 255); TextDrawFont(TDEditor_TD[2], 1); TextDrawSetProportional(TDEditor_TD[2], 1); TextDrawSetShadow(TDEditor_TD[2], 0); TextDrawSetSelectable(TDEditor_TD[2], true); TDEditor_TD[3] = TextDrawCreate(302.568298, 157.079666, "box"); TextDrawLetterSize(TDEditor_TD[3], 0.000000, 12.809001); TextDrawTextSize(TDEditor_TD[3], 363.451782, 0.000000); TextDrawAlignment(TDEditor_TD[3], 1); TextDrawColor(TDEditor_TD[3], -1); TextDrawUseBox(TDEditor_TD[3], 1); TextDrawBoxColor(TDEditor_TD[3], -1229539690); TextDrawSetShadow(TDEditor_TD[3], 0); TextDrawSetOutline(TDEditor_TD[3], 0); TextDrawBackgroundColor(TDEditor_TD[3], 255); TextDrawFont(TDEditor_TD[3], 1); TextDrawSetProportional(TDEditor_TD[3], 1); TextDrawSetShadow(TDEditor_TD[3], 0); TextDrawSetSelectable(TDEditor_TD[3], true); TDEditor_TD[4] = TextDrawCreate(202.719253, 157.079666, "box"); TextDrawLetterSize(TDEditor_TD[4], 0.000000, 12.809001); TextDrawTextSize(TDEditor_TD[4], 263.602966, 0.000000); TextDrawAlignment(TDEditor_TD[4], 1); TextDrawColor(TDEditor_TD[4], -1); TextDrawUseBox(TDEditor_TD[4], 1); TextDrawBoxColor(TDEditor_TD[4], -1229539690); TextDrawSetShadow(TDEditor_TD[4], 0); TextDrawSetOutline(TDEditor_TD[4], 0); TextDrawBackgroundColor(TDEditor_TD[4], 255); TextDrawFont(TDEditor_TD[4], 1); TextDrawSetProportional(TDEditor_TD[4], 1); TextDrawSetShadow(TDEditor_TD[4], 0); TextDrawSetSelectable(TDEditor_TD[4], true); TDEditor_TD[5] = TextDrawCreate(233.000259, 198.844406, "Empty_Slot"); TextDrawLetterSize(TDEditor_TD[5], 0.358999, 1.836444); TextDrawAlignment(TDEditor_TD[5], 2); TextDrawColor(TDEditor_TD[5], -1); TextDrawSetShadow(TDEditor_TD[5], 0); TextDrawSetOutline(TDEditor_TD[5], 0); TextDrawBackgroundColor(TDEditor_TD[5], 255); TextDrawFont(TDEditor_TD[5], 1); TextDrawSetProportional(TDEditor_TD[5], 1); TextDrawSetShadow(TDEditor_TD[5], 0); TextDrawSetSelectable(TDEditor_TD[5], true); TDEditor_TD[6] = TextDrawCreate(332.767730, 200.918487, "Empty_Slot"); TextDrawLetterSize(TDEditor_TD[6], 0.358999, 1.836444); TextDrawAlignment(TDEditor_TD[6], 2); TextDrawColor(TDEditor_TD[6], -1); TextDrawSetShadow(TDEditor_TD[6], 0); TextDrawSetOutline(TDEditor_TD[6], 0); TextDrawBackgroundColor(TDEditor_TD[6], 255); TextDrawFont(TDEditor_TD[6], 1); TextDrawSetProportional(TDEditor_TD[6], 1); TextDrawSetShadow(TDEditor_TD[6], 0); TextDrawSetSelectable(TDEditor_TD[6], true); TDEditor_TD[7] = TextDrawCreate(431.852752, 198.429595, "Empty_Slot"); TextDrawLetterSize(TDEditor_TD[7], 0.358999, 1.836444); TextDrawAlignment(TDEditor_TD[7], 2); TextDrawColor(TDEditor_TD[7], -1); TextDrawSetShadow(TDEditor_TD[7], 0); TextDrawSetOutline(TDEditor_TD[7], 0); TextDrawBackgroundColor(TDEditor_TD[7], 255); TextDrawFont(TDEditor_TD[7], 1); TextDrawSetProportional(TDEditor_TD[7], 1); TextDrawSetShadow(TDEditor_TD[7], 0); TextDrawSetSelectable(TDEditor_TD[7], true); TDEditor_TD[8] = TextDrawCreate(188.036071, 165.785202, ""); TextDrawLetterSize(TDEditor_TD[8], 0.000000, 0.000000); TextDrawTextSize(TDEditor_TD[8], 90.000000, 90.000000); TextDrawAlignment(TDEditor_TD[8], 1); TextDrawColor(TDEditor_TD[8], -1); TextDrawSetShadow(TDEditor_TD[8], 0); TextDrawSetOutline(TDEditor_TD[8], 0); TextDrawBackgroundColor(TDEditor_TD[8], 0); TextDrawFont(TDEditor_TD[8], 5); TextDrawSetProportional(TDEditor_TD[8], 0); TextDrawSetShadow(TDEditor_TD[8], 0); TextDrawSetSelectable(TDEditor_TD[8], true); TextDrawSetPreviewModel(TDEditor_TD[8], 19300); TextDrawSetPreviewRot(TDEditor_TD[8], 0.000000, 0.000000, 0.000000, 1.000000); TDEditor_TD[9] = TextDrawCreate(287.333343, 165.785202, ""); TextDrawLetterSize(TDEditor_TD[9], 0.000000, 0.000000); TextDrawTextSize(TDEditor_TD[9], 90.000000, 90.000000); TextDrawAlignment(TDEditor_TD[9], 1); TextDrawColor(TDEditor_TD[9], -1); TextDrawSetShadow(TDEditor_TD[9], 0); TextDrawSetOutline(TDEditor_TD[9], 0); TextDrawBackgroundColor(TDEditor_TD[9], 0); TextDrawFont(TDEditor_TD[9], 5); TextDrawSetProportional(TDEditor_TD[9], 0); TextDrawSetShadow(TDEditor_TD[9], 0); TextDrawSetSelectable(TDEditor_TD[9], true); TextDrawSetPreviewModel(TDEditor_TD[9], 19300); TextDrawSetPreviewRot(TDEditor_TD[9], 0.000000, 0.000000, 0.000000, 1.000000); TDEditor_TD[10] = TextDrawCreate(386.733551, 165.785202, ""); TextDrawLetterSize(TDEditor_TD[10], 0.000000, 0.000000); TextDrawTextSize(TDEditor_TD[10], 90.000000, 90.000000); TextDrawAlignment(TDEditor_TD[10], 1); TextDrawColor(TDEditor_TD[10], -1); TextDrawSetShadow(TDEditor_TD[10], 0); TextDrawSetOutline(TDEditor_TD[10], 0); TextDrawBackgroundColor(TDEditor_TD[10], 0); TextDrawFont(TDEditor_TD[10], 5); TextDrawSetProportional(TDEditor_TD[10], 0); TextDrawSetShadow(TDEditor_TD[10], 0); TextDrawSetSelectable(TDEditor_TD[10], true); TextDrawSetPreviewModel(TDEditor_TD[10], 19300); TextDrawSetPreviewRot(TDEditor_TD[10], 0.000000, 0.000000, 0.000000, 1.000000);