Where do i put this?
#6

pawn Код:
CMD:shop(playerid, params[])
{
  TextDrawShowForPlayer(playerid, Textdraw:0);
  TextDrawShowForPlayer(playerid, Textdraw:1);
  TextDrawShowForPlayer(playerid, Textdraw:2);
  TextDrawShowForPlayer(playerid, Textdraw:3);
  TextDrawShowForPlayer(playerid, Textdraw:4);
  TextDrawShowForPlayer(playerid, Textdraw:5);
  TextDrawShowForPlayer(playerid, Textdraw:6);
  TextDrawShowForPlayer(playerid, Textdraw:7);
  TextDrawShowForPlayer(playerid, Textdraw:8);

  PlayerTextDrawShow(playerid, Textdraw9[playerid]);
  PlayerTextDrawShow(playerid, Textdraw10[playerid]);
  PlayerTextDrawShow(playerid, Textdraw11[playerid]);
  PlayerTextDrawShow(playerid, Textdraw12[playerid]);
  PlayerTextDrawShow(playerid, Textdraw13[playerid]);
  PlayerTextDrawShow(playerid, Textdraw14[playerid]);
  PlayerTextDrawShow(playerid, Textdraw15[playerid]);

  SelectTextDraw(playerid, 0xFFFFFFAA);
  return 1;
}
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(playertextid == Textdraw9[playerid])
    {
        GivePlayerWeapon(playerid, 24,40);
        SendClientMessage(playerid, -1, "{FF9999}[SHOP]: {FFFFFF}You have bought a Deagle.");
    }
    else if(playertextid == Textdraw10[playerid])
    {
        GivePlayerWeapon(playerid, 25,25);
        SendClientMessage(playerid, -1, "{FF9999}[SHOP]: {FFFFFF}You have bought a Shotgun.");
    }
    else if(playertextid == Textdraw11[playerid])
    {
        GivePlayerWeapon(playerid, 34,20);
        SendClientMessage(playerid, -1, "{FF9999}[SHOP]: {FFFFFF}You have bought a Sniper.");
    }
    else if(playertextid == Textdraw12[playerid])
    {
        GivePlayerWeapon(playerid, 31,60);
        SendClientMessage(playerid, -1, "{FF9999}[SHOP]: {FFFFFF}You have bought a M4.");
    }
    else if(playertextid == Textdraw13[playerid])
    {
        GivePlayerWeapon(playerid, 27,30);
        SendClientMessage(playerid, -1, "{FF9999}[SHOP]: {FFFFFF}You have bought a Spas.");
    }
    else if(playertextid == Textdraw14[playerid])
    {
        GivePlayerWeapon(playerid, 4,1);
        SendClientMessage(playerid, -1, "{FF9999}[SHOP]: {FFFFFF}You have bought a Knife.");
    }
    else if(playertextid == Textdraw15[playerid])
    {
        SetPlayerArmour(playerid, 40);
        SendClientMessage(playerid, -1, "{FF9999}[SHOP]: {FFFFFF}You have bought an Armour.");
    }
    return 1;
}
Like that^
I dont think so you read my previous post properly.

You must read a documentation based on PlayerTextdraws. And read https://sampwiki.blast.hk/wiki/Errors_List
Reply


Messages In This Thread
Where do i put this? - by Glossy42O - 12.04.2015, 05:03
Re: Where do i put this? - by De4dpOol - 12.04.2015, 05:33
Re: Where do i put this? - by Glossy42O - 12.04.2015, 06:12
Re: Where do i put this? - by Gammix - 12.04.2015, 06:28
Re: Where do i put this? - by Glossy42O - 12.04.2015, 06:45
Re: Where do i put this? - by Gammix - 12.04.2015, 07:06
Re: Where do i put this? - by Glossy42O - 12.04.2015, 07:56
Re: Where do i put this? - by Gammix - 13.04.2015, 08:19

Forum Jump:


Users browsing this thread: 1 Guest(s)