Where do i put this?
#8

pawn Код:
CMD:shop(playerid, params[])
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    TextDrawShowForPlayer(playerid, Textdraw3);
    TextDrawShowForPlayer(playerid, Textdraw4);
    TextDrawShowForPlayer(playerid, Textdraw5);
    TextDrawShowForPlayer(playerid, Textdraw6);
    TextDrawShowForPlayer(playerid, Textdraw7);
    TextDrawShowForPlayer(playerid, Textdraw8);

    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;
}
Why have you put : in the textdraw vars. You should really look around for basics of PAWN.
Do you even read my previous posts, rather just askig for a straight solution.
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)