GunTD

Započeo adapt.
4. Mar. 2018. Zaključano
680
pregleda
8
postova
Luka Tomasevic
5
Godfather
4. Mar. 2018.
Problem(error/warning): Ubacim ja GUNTD i prvo radi i ja ga izbrisem i opet ga stavim i sad npr kad kliknem KUPI nista se ne desava samo stoji taj textdraw tu
Dio skripte:
#include < a_samp >
#include < zcmd >

#undef MAX_PLAYERS
#define MAX_PLAYERS    1000 // Prilagoditi

new PlayerText:GunTD[ MAX_PLAYERS ][ 1000 ];
new Stranica[ MAX_PLAYERS ];

public OnPlayerConnect(playerid)
{
    GunTD = CreatePlayerTextDraw(playerid, 200.058807, 153.250015, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, GunTD, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, GunTD, 238.000000, 128.000000);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, -5963521);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 4);
PlayerTextDrawSetProportional(playerid, GunTD, 0);
PlayerTextDrawSetShadow(playerid, GunTD, 0);

GunTD = CreatePlayerTextDraw(playerid, 201.941131, 155.000000, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, GunTD, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, GunTD, 234.000000, 124.000000);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, 255);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 4);
PlayerTextDrawSetProportional(playerid, GunTD, 0);
PlayerTextDrawSetShadow(playerid, GunTD, 0);

GunTD = CreatePlayerTextDraw(playerid, 249.941085, 148.583328, "ld_beat:chit");
PlayerTextDrawLetterSize(playerid, GunTD, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, GunTD, 26.000000, 30.000000);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, -5963521);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 4);
PlayerTextDrawSetProportional(playerid, GunTD, 0);
PlayerTextDrawSetShadow(playerid, GunTD, 0);

GunTD = CreatePlayerTextDraw(playerid, 201.470642, 154.416625, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, GunTD, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, GunTD, 62.000000, 19.000000);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, -5963521);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 4);
PlayerTextDrawSetProportional(playerid, GunTD, 0);
PlayerTextDrawSetShadow(playerid, GunTD, 0);

GunTD = CreatePlayerTextDraw(playerid, 209.999984, 155.000015, "Deagle");
PlayerTextDrawLetterSize(playerid, GunTD, 0.304941, 1.483333);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, 255);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 2);
PlayerTextDrawSetProportional(playerid, GunTD, 1);
PlayerTextDrawSetShadow(playerid, GunTD, 0);

GunTD = CreatePlayerTextDraw(playerid, 364.294158, 147.999969, "ld_beat:chit");
PlayerTextDrawLetterSize(playerid, GunTD, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, GunTD, 26.000000, 30.000000);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, -5963521);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 4);
PlayerTextDrawSetProportional(playerid, GunTD, 0);
PlayerTextDrawSetShadow(playerid, GunTD, 0);

GunTD = CreatePlayerTextDraw(playerid, 375.588409, 153.833282, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, GunTD, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, GunTD, 62.000000, 19.000000);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, -5963521);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 4);
PlayerTextDrawSetProportional(playerid, GunTD, 0);
PlayerTextDrawSetShadow(playerid, GunTD, 0);

GunTD = CreatePlayerTextDraw(playerid, 375.647125, 155.000015, "Cena:_5000$");
PlayerTextDrawLetterSize(playerid, GunTD, 0.217411, 1.541666);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, 255);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 2);
PlayerTextDrawSetProportional(playerid, GunTD, 1);
PlayerTextDrawSetShadow(playerid, GunTD, 0);

GunTD = CreatePlayerTextDraw(playerid, 219.823547, 139.833328, "");
PlayerTextDrawLetterSize(playerid, GunTD, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, GunTD, 162.000000, 152.000000);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, -1);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 1090519040);
PlayerTextDrawFont(playerid, GunTD, 5);
PlayerTextDrawSetProportional(playerid, GunTD, 0);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetPreviewModel(playerid, GunTD, 355);
PlayerTextDrawSetPreviewRot(playerid, GunTD, 0.000000, 0.000000, 180.000000, 3.000000);

GunTD = CreatePlayerTextDraw(playerid, 236.764755, 206.916595, "ld_beat:left");
PlayerTextDrawLetterSize(playerid, GunTD, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, GunTD, 18.000000, 13.000000);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, -5963521);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 4);
PlayerTextDrawSetProportional(playerid, GunTD, 0);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetSelectable(playerid, GunTD, true);

GunTD = CreatePlayerTextDraw(playerid, 382.646972, 206.916610, "ld_beat:right");
PlayerTextDrawLetterSize(playerid, GunTD, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, GunTD, 18.000000, 13.000000);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, -5963521);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 4);
PlayerTextDrawSetProportional(playerid, GunTD, 0);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetSelectable(playerid, GunTD, true);

GunTD = CreatePlayerTextDraw(playerid, 262.647125, 255.916641, "ld_beat:chit");
PlayerTextDrawLetterSize(playerid, GunTD, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, GunTD, 26.000000, 30.000000);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, -5963521);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 4);
PlayerTextDrawSetProportional(playerid, GunTD, 0);
PlayerTextDrawSetShadow(playerid, GunTD, 0);

GunTD = CreatePlayerTextDraw(playerid, 343.588104, 255.916641, "ld_beat:chit");
PlayerTextDrawLetterSize(playerid, GunTD, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, GunTD, 26.000000, 30.000000);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, -5963521);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 4);
PlayerTextDrawSetProportional(playerid, GunTD, 0);
PlayerTextDrawSetShadow(playerid, GunTD, 0);

GunTD = CreatePlayerTextDraw(playerid, 274.411804, 261.166625, "LD_SPAC:white");
PlayerTextDrawLetterSize(playerid, GunTD, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, GunTD, 83.000000, 19.000000);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, -5963521);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 4);
PlayerTextDrawSetProportional(playerid, GunTD, 0);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetSelectable(playerid, GunTD, true);

GunTD = CreatePlayerTextDraw(playerid, 287.646881, 263.500030, "]_KUPI_]");
PlayerTextDrawLetterSize(playerid, GunTD, 0.304941, 1.483333);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, 255);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 2);
PlayerTextDrawSetProportional(playerid, GunTD, 1);
PlayerTextDrawSetShadow(playerid, GunTD, 0);

return 1;
}
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == GunTD[ playerid ][ 9 ])
{
    if(Stranica[ playerid ] == 1)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 10;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 373);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "Armour");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_7000$");
}
else if(Stranica[ playerid ] == 2)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 1;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 348);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "Deagle");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_4000$");
}
else if(Stranica[ playerid ] == 3)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 2;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 346);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "9mm");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_2500$");
}
else if(Stranica[ playerid ] == 4)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 3;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 355);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "AK-47");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_5000$");
}
else if(Stranica[ playerid ] == 5)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 4;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 356);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "M4");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_5000$");
}
else if(Stranica[ playerid ] == 6)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 5;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 353);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "M5");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_4500$");
}
else if(Stranica[ playerid ] == 7)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 6;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 352);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "Uzi");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_4000$");
}
else if(Stranica[ playerid ] == 8)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 7;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 372);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "Tec-9");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_4000$");
}
else if(Stranica[ playerid ] == 9)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 8;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 349);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "Shotgun");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_5000$");
}
else if(Stranica[ playerid ] == 10)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 9;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 358);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "Sniper");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_8500$");
}
}
else if(playertextid == GunTD[ playerid ][ 10 ])
{
    if(Stranica[ playerid ] == 1)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 2;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 346);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "9mm");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_2500$");
}
else if(Stranica[ playerid ] == 2)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 3;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 355);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "AK-47");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_5000$");
}
else if(Stranica[ playerid ] == 3)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 4;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 356);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "M4");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_5000$");
}
else if(Stranica[ playerid ] == 4)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 5;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 353);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "M5");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_4500$");
}
else if(Stranica[ playerid ] == 5)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 6;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 352);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "Uzi");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_4000$");
}
else if(Stranica[ playerid ] == 6)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 7;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 372);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "Tec-9");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_4000$");
}
else if(Stranica[ playerid ] == 7)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 8;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 349);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "Shotgun");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_5000$");
}
else if(Stranica[ playerid ] == 8)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 9;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 358);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "Sniper");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_8500$");
}
else if(Stranica[ playerid ] == 9)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 10;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 373);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "Armour");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_7000$");
}
else if(Stranica[ playerid ] == 10)
{
PlayerTextDrawHide(playerid, GunTD[ playerid ][ 8 ]);
Stranica[ playerid ] = 1;
PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 348);
PlayerTextDrawShow(playerid, GunTD[ playerid ][ 8 ]);
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 4 ], "Deagle");
PlayerTextDrawSetString(playerid, GunTD[ playerid ][ 7 ], "Cena:_4000$");
}
}
else if(playertextid == GunTD[ playerid ][ 13 ])
{
    if(Stranica[ playerid ] == 1)
    {
            for(new i; i < 15; i++) { PlayerTextDrawHide(playerid, GunTD[ playerid ][ i ]); Stranica[ playerid ] = 0; CancelSelectTextDraw(playerid); }
if(GetPlayerMoney(playerid) < 4000) return SendClientMessage(playerid, -1, "Nemate dovoljno novca.");
GivePlayerMoney(playerid, -4000);
GivePlayerWeapon(playerid, 24, 100);
SendClientMessage(playerid, -1, "Uspesno ste kupili Deagle za 4000$ ( 100 metkova ).");
}
else if(Stranica[ playerid ] == 2)
{
    for(new i; i < 15; i++) { PlayerTextDrawHide(playerid, GunTD[ playerid ][ i ]); Stranica[ playerid ] = 0; CancelSelectTextDraw(playerid); }
if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid, -1, "Nemate dovoljno novca.");
GivePlayerMoney(playerid, -2500);
GivePlayerWeapon(playerid, 22, 100);
SendClientMessage(playerid, -1, "Uspesno ste kupili 9mm za 2500$ ( 100 metkova ).");
}
else if(Stranica[ playerid ] == 3)
{
    for(new i; i < 15; i++) { PlayerTextDrawHide(playerid, GunTD[ playerid ][ i ]); Stranica[ playerid ] = 0; CancelSelectTextDraw(playerid); }
if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, -1, "Nemate dovoljno novca.");
GivePlayerMoney(playerid, -5000);
GivePlayerWeapon(playerid, 30, 150);
SendClientMessage(playerid, -1, "Uspesno ste kupili AK-47 za 5000$ ( 150 metkova ).");
}
else if(Stranica[ playerid ] == 4)
{
    for(new i; i < 15; i++) { PlayerTextDrawHide(playerid, GunTD[ playerid ][ i ]); Stranica[ playerid ] = 0; CancelSelectTextDraw(playerid); }
if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, -1, "Nemate dovoljno novca.");
GivePlayerMoney(playerid, -5000);
GivePlayerWeapon(playerid, 31, 150);
SendClientMessage(playerid, -1, "Uspesno ste kupili M4 za 5000$ ( 150 metkova ).");
}
else if(Stranica[ playerid ] == 5)
{
    for(new i; i < 15; i++) { PlayerTextDrawHide(playerid, GunTD[ playerid ][ i ]); Stranica[ playerid ] = 0; CancelSelectTextDraw(playerid); }
if(GetPlayerMoney(playerid) < 4500) return SendClientMessage(playerid, -1, "Nemate dovoljno novca.");
GivePlayerMoney(playerid, -4500);
GivePlayerWeapon(playerid, 29, 150);
SendClientMessage(playerid, -1, "Uspesno ste kupili M5 za 4500$ ( 150 metkova ).");
}
else if(Stranica[ playerid ] == 6)
{
    for(new i; i < 15; i++) { PlayerTextDrawHide(playerid, GunTD[ playerid ][ i ]); Stranica[ playerid ] = 0; CancelSelectTextDraw(playerid); }
if(GetPlayerMoney(playerid) < 4000) return SendClientMessage(playerid, -1, "Nemate dovoljno novca.");
GivePlayerMoney(playerid, -4000);
GivePlayerWeapon(playerid, 28, 150);
SendClientMessage(playerid, -1, "Uspesno ste kupili Uzi za 4000$ ( 150 metkova ).");
}
else if(Stranica[ playerid ] == 7)
{
    for(new i; i < 15; i++) { PlayerTextDrawHide(playerid, GunTD[ playerid ][ i ]); Stranica[ playerid ] = 0; CancelSelectTextDraw(playerid); }
if(GetPlayerMoney(playerid) < 4000) return SendClientMessage(playerid, -1, "Nemate dovoljno novca.");
GivePlayerMoney(playerid, -4000);
GivePlayerWeapon(playerid, 32, 150);
SendClientMessage(playerid, -1, "Uspesno ste kupili Tec-9 za 4000$ ( 150 metkova ).");
}
else if(Stranica[ playerid ] == 8)
{
    for(new i; i < 15; i++) { PlayerTextDrawHide(playerid, GunTD[ playerid ][ i ]); Stranica[ playerid ] = 0; CancelSelectTextDraw(playerid); }
if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, -1, "Nemate dovoljno novca.");
GivePlayerMoney(playerid, -5000);
GivePlayerWeapon(playerid, 25, 50);
SendClientMessage(playerid, -1, "Uspesno ste kupili Shotgun za 5000$ ( 50 metkova ).");
}
else if(Stranica[ playerid ] == 9)
{
for(new i; i < 15; i++) { PlayerTextDrawHide(playerid, GunTD[ playerid ][ i ]); Stranica[ playerid ] = 0; CancelSelectTextDraw(playerid); }
if(GetPlayerMoney(playerid) < 8500) return SendClientMessage(playerid, -1, "Nemate dovoljno novca.");
GivePlayerMoney(playerid, -8500);
GivePlayerWeapon(playerid, 34, 30);
SendClientMessage(playerid, -1, "Uspesno ste kupili Sniper za 8500$ ( 30 metkova ).");
}
else if(Stranica[ playerid ] == 10)
{
for(new i; i < 15; i++) { PlayerTextDrawHide(playerid, GunTD[ playerid ][ i ]); Stranica[ playerid ] = 0; CancelSelectTextDraw(playerid); }
if(GetPlayerMoney(playerid) < 7000) return SendClientMessage(playerid, -1, "Nemate dovoljno novca.");
GivePlayerMoney(playerid, -7000);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, -1, "Uspesno ste kupili Armour za 7000$");
}
}
return 1;
}

CMD:kupigun(playerid, params[])
{
if(Stranica[ playerid ] > 0) { for(new i; i < 15; i++) { PlayerTextDrawHide(playerid, GunTD[ playerid ][ i ]); Stranica[ playerid ] = 0; CancelSelectTextDraw(playerid); } }
else { for(new i; i < 15; i++) { PlayerTextDrawSetPreviewModel(playerid, GunTD[ playerid ][ 8 ], 348); PlayerTextDrawShow(playerid, GunTD[ playerid ][ i ]); Stranica[ playerid ] = 1; SelectTextDraw(playerid, 0xFFA500FF); } }
return 1;
}

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
//

Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/a/0iZLB
Vincenzo_Peruggia
5
OG Legend
4. Mar. 2018.
Zameni ovako
GunTD = CreatePlayerTextDraw(playerid, 287.646881, 263.500030, "]_KUPI_]");
PlayerTextDrawLetterSize(playerid, GunTD, 0.304941, 1.483333);
PlayerTextDrawAlignment(playerid, GunTD, 1);
PlayerTextDrawColor(playerid, GunTD, 255);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetOutline(playerid, GunTD, 0);
PlayerTextDrawBackgroundColor(playerid, GunTD, 255);
PlayerTextDrawFont(playerid, GunTD, 2);
PlayerTextDrawSetProportional(playerid, GunTD, 1);
PlayerTextDrawSetShadow(playerid, GunTD, 0);
PlayerTextDrawSetSelectable(playerid, GunTD, true);
Luka Tomasevic
5
Godfather
4. Mar. 2018.
Opet isto
ophion
5
OG Legend
4. Mar. 2018.
SelectTextdraw koristi
Shomy Script
6
Godfather
4. Mar. 2018.
new PlayerText:GunTD[ MAX_PLAYERS ][ 1000 ];
Koji ce ti index 1000? Zameni sa new PlayerText:GunTD[ MAX_PLAYERS ][ 15 ];
Daltone
2
Rookie
5. Mar. 2018.
Prvo stavi new PlayerText:GunTD[ MAX_PLAYERS ][ 15 ];
Dodaj PlayerTextDrawSetSelectable(playerid, GunTD, true); u textdrawu 14
I trebalo bi da radi normalno
muamerkadusic
5
Godfather
5. Mar. 2018.
0000000000 money a u skripti pise da oduzima -5000 kad kupi gun  😢 😢
mozes ti kupit nesto ako nemas novac??  😕
ophion
5
OG Legend
5. Mar. 2018.
◄ ᴍᴜᴍᴀx ► wrote on March 5, 2018, 2:39 pm:
0000000000 money a u skripti pise da oduzima -5000 kad kupi gun  😢 😢
mozes ti kupit nesto ako nemas novac??  😕
moze otici u minus ako skripta zahtijeva, ako nema provjera za novac

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha