[Include] CopTools (0.3c)
#1

Hey there,

Just a small thing I made while checking out the new functions, is a include containing the following functions:

-PutRiotShieldOnBack(playerid) Puts a shield on the player's back
-PutRiotShieldOnArm(playerid) Puts a shield on the player's arm
-GiveFlashLight(playerid) Puts a flashlight in the player's left hand
-GiveTazer(playerid) Puts a tazer in the player's left hand
-RemoveItems(playerid) Removes Items

It might not be free of bugs yet, cause I just made it and it only tested it on the normal cop skins. (It's possible that they don't fit well on some skins.)

You can't hold 2 shields at once, and same with the flashlight and the tazer, you can't have them both at the same time, in the same hand.

Screens:

Gallery:/imageshack/gal.php?g...1208185229.png


Uploaded with ImageShack.us

Use it by putting <cop-tools> at the top of your script as always.

Download(PasteBin)
Download(EasyUpload)

Example code on how to use it in a command:
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/arm", cmdtext, true, 10) == 0)
    {
        PutRiotShieldOnArm(playerid);
        return 1;
    }
    if (strcmp("/back", cmdtext, true, 10) == 0)
    {
        PutRiotShieldOnBack(playerid);
        return 1;
    }
    if (strcmp("/light", cmdtext, true, 10) == 0)
    {
        GiveFlashLight(playerid);
        return 1;
    }
    if (strcmp("/tazer", cmdtext, true, 10) == 0)
    {
        GiveTazer(playerid);
        return 1;
    }
    if (strcmp("/removeitems", cmdtext, true, 10) == 0)
    {
        RemoveItems(playerid);
        return 1;
    }
    return 0;
}
Reply
#2

Cool thanx will test it when i got time.
Reply
#3

Screen please?
Reply
#4

Sounds good. Got some screens?
Reply
#5

Working on screens, if you already downloaded, re-download it, i changed some things.
I will make some delete commands too, give me second :P.
Reply
#6

always pastebin please.
Reply
#7

You should have some function to remove the object?
Reply
#8

RemoveItems(playerid)
Reply
#9

Thanks for doing an include, that saves up to 50 lines
Reply
#10

Does the shield work ok when you are crouched??
Reply
#11

Yes it does.
Reply
#12

WoW Awesome

But
Код:
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC3\filterscripts\PD0.3c.pwn(66) : warning 203: symbol is never used: "RemoveItems"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Help me ?
Reply
#13

Don't worry about that error.
Reply
#14

Nice, easy to make though
Reply
#15

Quote:
Originally Posted by Delux13
Посмотреть сообщение
Nice, easy to make though
But if it's easy to make, why did noone make it before me?
Reply
#16

i get error, i add #include <cop-tools> at the include lines and i get this error when i compile
Код:
C:\Documents and Settings\Tom Attewell\My Documents\samp_0\gamemodes\sarp.pwn(41869) : warning 203: symbol is never used: "GiveFlashLight"
C:\Documents and Settings\Tom Attewell\My Documents\samp_0\gamemodes\sarp.pwn(41869) : warning 203: symbol is never used: "GiveTazer"
C:\Documents and Settings\Tom Attewell\My Documents\samp_0\gamemodes\sarp.pwn(41869) : warning 203: symbol is never used: "PutRiotShieldOnArm"
C:\Documents and Settings\Tom Attewell\My Documents\samp_0\gamemodes\sarp.pwn(41869) : warning 203: symbol is never used: "PutRiotShieldOnBack"
C:\Documents and Settings\Tom Attewell\My Documents\samp_0\gamemodes\sarp.pwn(41869) : warning 203: symbol is never used: "RemoveItems"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Warnings.
i dont have line 41869, can someone help me please?
Reply
#17

Quote:
Originally Posted by paramedic114
Посмотреть сообщение
i get error, i add #include <cop-tools> at the include lines and i get this error when i compile
Код:
C:\Documents and Settings\Tom Attewell\My Documents\samp_0\gamemodes\sarp.pwn(41869) : warning 203: symbol is never used: "GiveFlashLight"
C:\Documents and Settings\Tom Attewell\My Documents\samp_0\gamemodes\sarp.pwn(41869) : warning 203: symbol is never used: "GiveTazer"
C:\Documents and Settings\Tom Attewell\My Documents\samp_0\gamemodes\sarp.pwn(41869) : warning 203: symbol is never used: "PutRiotShieldOnArm"
C:\Documents and Settings\Tom Attewell\My Documents\samp_0\gamemodes\sarp.pwn(41869) : warning 203: symbol is never used: "PutRiotShieldOnBack"
C:\Documents and Settings\Tom Attewell\My Documents\samp_0\gamemodes\sarp.pwn(41869) : warning 203: symbol is never used: "RemoveItems"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Warnings.
i dont have line 41869, can someone help me please?
This is nothing to worry about, just use the functions, and they will disappear
Reply
#18

You got so many unique ideas.I love it,Call of duty style :P
Reply
#19

what do you mean "just use the functions"
Reply
#20

Nice one thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)