A Little help, Please - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A Little help, Please (
/showthread.php?tid=261458)
A Little help, Please -
seanny - 13.06.2011
Hello,
I would like this script changed from being a riot shield to armor.
I did a few edits like the /armor and the "[SCRP]: you are not a cop!" and "You are now wearing armor."
pawn Код:
if(strcmp("/armor", cmdtext, true, 10) == 0)//Riot Shield - PaNoULiS
{
if(PlayerInfo[playerid][pSFMember] != 1 && PlayerInfo[playerid][pRank] <= 3)
{
SendClientMessage(playerid, COLOR_RED, "[SCRP]: Error, You are Not a cop!");
return 1;
}
SendClientMessage(playerid, COLOR_WHITE, "You are Now wearing Armor.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "** %s grabs a pair of police armor and puts it on.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PutRiotShieldOnArm(playerid);
return 1;
}
Re: A Little help, Please -
King Ace - 13.06.2011
You need to edit this:
pawn Код:
PutRiotShieldOnArm(playerid);
And if i am right, then it should look lihe this:
pawn Код:
PutArmorOnBody(playerid);
Re: A Little help, Please -
seanny - 13.06.2011
Is this part right?
pawn Код:
//Police Armor System - Sean :D
PutArmorOnBody(playerid)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, 1));
SetPlayerAttachedObject(playerid,1,19142,1,0.1,0.05,0.0,0.0,0.0,0.0);
SetPlayerArmour(playerid,100.0);
}
Re: A Little help, Please -
King Ace - 13.06.2011
In my eyes, this is OK.