Bandana help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bandana help (
/showthread.php?tid=353448)
Bandana help -
kepa333 - 23.06.2012
Yo i need some help I just edited my Bandana so u couldt buy it inside a 24/7 Now i want it to say when u not near the 24/7 , Like Your Not near The Shop Couldt anyone help me? lines
PHP код:
if(strcmp(cmd, "/bandana1", true) == 0) //edited by Boyka
{
if(IsAtClothShop(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE,"USAGE: /buybandana 1, 2 ,3 ,4 ,5 ,6 ,7 , 8 ,9 ,10 [Bandana ID]");
return 1;
}
if(PlayerInfo[playerid][pDuty] == 0) // your factions id here
{
SetPlayerAttachedObject(playerid, 2, 18911, 2,0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
GivePlayerMoney(playerid,-200);
SafeGivePlayerMoney(playerid, - 200);
SendClientMessage(playerid, COLOR_GREEN, "Do /bandanaoff to get it off");
}
else if(PlayerInfo[playerid][pDuty] == 0) // your factions id here
{
RemovePlayerAttachedObject(playerid, 2);
SendClientMessage(playerid, COLOR_GREEN, "You have Removed Your bandana");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You cannot use Bandana when you are A cop Onduty!");
}
}
return 1;
}
Re: Bandana help -
SomebodyAndMe - 23.06.2012
pawn Код:
if(strcmp(cmd, "/bandana1", true) == 0) //edited by Boyka
{
if(IsAtClothShop(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE,"USAGE: /buybandana 1, 2 ,3 ,4 ,5 ,6 ,7 , 8 ,9 ,10 [Bandana ID]");
return 1;
}
if(PlayerInfo[playerid][pDuty] == 0) // your factions id here
{
SetPlayerAttachedObject(playerid, 2, 18911, 2,0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
GivePlayerMoney(playerid,-200);
SafeGivePlayerMoney(playerid, - 200);
SendClientMessage(playerid, COLOR_GREEN, "Do /bandanaoff to get it off");
}
else if(PlayerInfo[playerid][pDuty] == 0) // your factions id here
{
RemovePlayerAttachedObject(playerid, 2);
SendClientMessage(playerid, COLOR_GREEN, "You have Removed Your bandana");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You cannot use Bandana when you are A cop Onduty!");
}
}
else SendClientMessage(playerid, COLOR_RED, "You are not at the shop!");
return 1;
}
Re: Bandana help -
kepa333 - 23.06.2012
Ty ill test +1 rep