13.04.2015, 08:19
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;
}
Do you even read my previous posts, rather just askig for a straight solution.