23.05.2015, 21:08
olб galera eu baixei um fs de escolher skin em textdraw mais ele ta muito desorganizado ele eu acho e nгo consigo por em meu gamemode.. alguem poderia deixar ele organizado? e converter o comando pra zcmd?
Agradecido ^^
Agradecido ^^
PHP код:
/*
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_ _
| | | |
| |__| |_ ____ _ _ __ __ _ PAWN Scripts
| __ \ \ /\ / / _` | '_ \ / _` |
| | | |\ V V / (_| | | | | (_| |
|_| |_| \_/\_/ \__,_|_| |_|\__, |
__/ |
|___/
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
#include a_samp
new
Text:TipText[MAX_PLAYERS],
Text:TipText1[MAX_PLAYERS],
Text:TipText2[MAX_PLAYERS],
Text:TipText3[MAX_PLAYERS],
Text:TipText4[MAX_PLAYERS],
Text:TipText5[MAX_PLAYERS],
Text:TipText6[MAX_PLAYERS],
SkinAktif[MAX_PLAYERS]
;
public OnFilterScriptInit(){
return SkinTextYukle(), print("Skin Degistirici | Aktif edildi.") ,true;}
public OnFilterScriptExit(){
return print("Skin Degistirici | De-Aktif edildi.") ,true;}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == TipText1[playerid]){
OnPlayerCommandText(playerid, "/skin");}
if(clickedid == TipText3[playerid]){
TextDrawHideForPlayer(playerid, TipText2[playerid]);
TextDrawHideForPlayer(playerid, TipText5[playerid]);
TextDrawHideForPlayer(playerid, TipText6[playerid]);
SkinAktif[playerid] -= 1;
TextDrawSetPreviewModel(TipText6[playerid], SkinAktif[playerid]+1);
TextDrawSetPreviewModel(TipText5[playerid], SkinAktif[playerid]-1);
TextDrawSetPreviewModel(TipText2[playerid], SkinAktif[playerid]);
TextDrawShowForPlayer(playerid, TipText5[playerid]);
TextDrawShowForPlayer(playerid, TipText6[playerid]);
TextDrawShowForPlayer(playerid, TipText2[playerid]);}
if(SkinAktif[playerid] < 0) { OnPlayerCommandText(playerid, "/skin"),OnPlayerCommandText(playerid, "/skin"); }
if(clickedid == TipText4[playerid]){
TextDrawHideForPlayer(playerid, TipText2[playerid]);
TextDrawHideForPlayer(playerid, TipText5[playerid]);
TextDrawHideForPlayer(playerid, TipText6[playerid]);
SkinAktif[playerid] += 1;
TextDrawSetPreviewModel(TipText6[playerid], SkinAktif[playerid]+1);
TextDrawSetPreviewModel(TipText5[playerid], SkinAktif[playerid]-1);
TextDrawSetPreviewModel(TipText2[playerid], SkinAktif[playerid]);
TextDrawShowForPlayer(playerid, TipText2[playerid]);
TextDrawShowForPlayer(playerid, TipText6[playerid]);
TextDrawShowForPlayer(playerid, TipText5[playerid]);
if(SkinAktif[playerid] > 299) { OnPlayerCommandText(playerid, "/skin"),OnPlayerCommandText(playerid, "/skin"); }}
if(clickedid == TipText2[playerid]){
SetPlayerSkin(playerid, SkinAktif[playerid]);
OnPlayerCommandText(playerid, "/skin");}
return true;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/skin", true)){
if(GetPVarInt(playerid, "SkinCMD") == 0)
{
TextDrawHideForPlayer(playerid, TipText5[playerid]);
TextDrawHideForPlayer(playerid, TipText6[playerid]);
SelectTextDraw(playerid, 0x00FF00FF);
SetPVarInt(playerid, "SkinCMD", 1);
SkinAktif[playerid] = 0;
TextDrawSetPreviewModel(TipText6[playerid], SkinAktif[playerid]+1);
TextDrawSetPreviewModel(TipText5[playerid], SkinAktif[playerid]-1);
TextDrawSetPreviewModel(TipText2[playerid], 0);
TextDrawShowForPlayer(playerid, TipText[playerid]);TextDrawShowForPlayer(playerid, TipText1[playerid]);
TextDrawShowForPlayer(playerid, TipText2[playerid]);TextDrawShowForPlayer(playerid, TipText3[playerid]);
TextDrawShowForPlayer(playerid, TipText4[playerid]);TextDrawShowForPlayer(playerid, TipText5[playerid]);TextDrawShowForPlayer(playerid, TipText6[playerid]);
} else {
SetPVarInt(playerid, "SkinCMD", 0);
SkinAktif[playerid] = 0;
CancelSelectTextDraw(playerid);
TextDrawHideForPlayer(playerid, TipText[playerid]);TextDrawHideForPlayer(playerid, TipText1[playerid]);
TextDrawHideForPlayer(playerid, TipText2[playerid]);TextDrawHideForPlayer(playerid, TipText3[playerid]);
TextDrawHideForPlayer(playerid, TipText4[playerid]);TextDrawHideForPlayer(playerid, TipText5[playerid]);TextDrawHideForPlayer(playerid, TipText6[playerid]);
}
return true;
}
return true;
}
stock SkinTextYukle(){
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++) {
TipText[playerid] = TextDrawCreate(240.000000, 150.000000, "skinPencere");
TextDrawBackgroundColor(TipText[playerid], 255);TextDrawFont(TipText[playerid], 1);TextDrawLetterSize(TipText[playerid], 0.000000, 22.000000);TextDrawColor(TipText[playerid], -1);
TextDrawSetOutline(TipText[playerid], 0);TextDrawSetProportional(TipText[playerid], 1);TextDrawSetShadow(TipText[playerid], 1);TextDrawUseBox(TipText[playerid], 1);TextDrawBoxColor(TipText[playerid], 1515870810); TextDrawTextSize(TipText[playerid], 401.000000, 0.000000);TextDrawSetSelectable(TipText[playerid], 0);
TipText1[playerid] = TextDrawCreate(389.000000, 149.000000, "X");TextDrawBackgroundColor(TipText1[playerid], 90);
TextDrawFont(TipText1[playerid], 1);TextDrawLetterSize(TipText1[playerid], 0.500000, 1.000000);TextDrawColor(TipText1[playerid], -16776961);TextDrawSetOutline(TipText1[playerid], 1);
TextDrawSetProportional(TipText1[playerid], 1);TextDrawSetSelectable(TipText1[playerid], 1);
TipText2[playerid] = TextDrawCreate(254.000000, 151.000000, "skinResim");TextDrawBackgroundColor(TipText2[playerid], false);TextDrawFont(TipText2[playerid], 5);TextDrawLetterSize(TipText2[playerid], 0.500000, 1.000000);
TextDrawColor(TipText2[playerid], -1);TextDrawSetOutline(TipText2[playerid], 0);TextDrawSetProportional(TipText2[playerid], 1);TextDrawSetShadow(TipText2[playerid], 1);TextDrawUseBox(TipText2[playerid], 1);
TextDrawBoxColor(TipText2[playerid], false);TextDrawTextSize(TipText2[playerid], 133.000000, 139.000000); TextDrawSetPreviewRot(TipText2[playerid], -30.000000, 0.000000, -55.000000, 1.000000);TextDrawSetSelectable(TipText2[playerid], 1);
TipText3[playerid] = TextDrawCreate(259.000000, 319.000000, "<<");TextDrawBackgroundColor(TipText3[playerid], 255);TextDrawFont(TipText3[playerid], 1);
TextDrawLetterSize(TipText3[playerid], 0.549999, 2.700000);TextDrawColor(TipText3[playerid], -1);TextDrawSetOutline(TipText3[playerid], 1);TextDrawSetProportional(TipText3[playerid], 1);TextDrawSetSelectable(TipText3[playerid], 1);
TipText4[playerid] = TextDrawCreate(357.000000, 319.000000, ">>");TextDrawBackgroundColor(TipText4[playerid], 255);
TextDrawFont(TipText4[playerid], 1);TextDrawLetterSize(TipText4[playerid], 0.549999, 2.700000);
TextDrawColor(TipText4[playerid], -1);TextDrawSetOutline(TipText4[playerid], 1);
TextDrawSetProportional(TipText4[playerid], 1);TextDrawSetSelectable(TipText4[playerid], 1);
TipText5[playerid] = TextDrawCreate(200.000000, 165.000000, "skinResim_geri");TextDrawBackgroundColor(TipText5[playerid], false);
TextDrawFont(TipText5[playerid], 5);TextDrawLetterSize(TipText5[playerid], 0.500000, 1.000000);
TextDrawColor(TipText5[playerid], -1);TextDrawSetOutline(TipText5[playerid], 0);
TextDrawSetProportional(TipText5[playerid], 1);TextDrawSetShadow(TipText5[playerid], 1);
TextDrawUseBox(TipText5[playerid], 1);TextDrawBoxColor(TipText5[playerid], false);
TextDrawTextSize(TipText5[playerid], 133.000000, 139.000000);TextDrawSetPreviewModel(TipText5[playerid], 0);
TextDrawSetPreviewRot(TipText5[playerid], -30.000000, 0.000000, -55.000000, 1.500000);TextDrawSetSelectable(TipText5[playerid], 0);
TipText6[playerid] = TextDrawCreate(313.000000, 165.000000, "skinResim_ileri");
TextDrawBackgroundColor(TipText6[playerid], false);TextDrawFont(TipText6[playerid], 5);TextDrawLetterSize(TipText6[playerid], 0.500000, 1.000000);
TextDrawColor(TipText6[playerid], -1);TextDrawSetOutline(TipText6[playerid], 0);TextDrawSetProportional(TipText6[playerid], 1);
TextDrawSetShadow(TipText6[playerid], 1);TextDrawUseBox(TipText6[playerid], 1);
TextDrawBoxColor(TipText6[playerid], false);TextDrawTextSize(TipText6[playerid], 133.000000, 139.000000);
TextDrawSetPreviewModel(TipText6[playerid], 0);TextDrawSetPreviewRot(TipText6[playerid], -30.000000, 0.000000, -55.000000, 1.500000);TextDrawSetSelectable(TipText6[playerid], 0);}
return true;
}