12.04.2015, 07:06
(
Последний раз редактировалось Gammix; 13.04.2015 в 08:18.
)
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;
}
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