SA-MP Forums Archive
[Include] CopTools (0.3c) - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] CopTools (0.3c) (/showthread.php?tid=197305)

Pages: 1 2 3


Re: CopTools (0.3c) - jameskmonger - 18.12.2010

Is the riot shield bulletproof?


Re: CopTools (0.3c) - Geso - 19.12.2010

Quote:
Originally Posted by paramedic114
Посмотреть сообщение
what do you mean "just use the functions"
Functions:

GiveFlashLight(playerid)
GiveTazer(playerid)
etc.


And unfortunately the shield is not bullet proof, but none of the objects that a player can hold are solid.


Re: CopTools (0.3c) - knackworst - 19.12.2010

nice! but you should update with the police helmet, it's a new object in 0.3C 5


Re: CopTools (0.3c) - paramedic114 - 19.12.2010

Quote:
Originally Posted by Geso
Посмотреть сообщение
Functions:

GiveFlashLight(playerid)
GiveTazer(playerid)
etc.


And unfortunately the shield is not bullet proof, but none of the objects that a player can hold are solid.
where do i put them and how do i put them....?


Re: CopTools (0.3c) - Geso - 19.12.2010

Example commands:

Код:
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;
    }
    return 0;
}



Re: CopTools (0.3c) - paramedic114 - 19.12.2010

ah, thanks




EDIT:
Код:
C:\Documents and Settings\Tom Attewell\My Documents\samp_0\gamemodes\sarp.pwn(41873) : error 021: symbol already defined: "OnPlayerCommandText"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
41870:   WasCheckBy[playerid] = 999;
41871:   }
41872:   public OnPlayerCommandText(playerid, cmdtext[])
41873:   {
41874:   if (strcmp("/getshield", cmdtext, true, 10) == 0)
41875:   {
tried loads of things any ideas?


Re: CopTools (0.3c) - paramedic114 - 19.12.2010

bump


Re: CopTools (0.3c) - Geso - 19.12.2010

pawn Код:
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;
    }
//other commands
//other commands
//other commands
    return 0;


}
Add them in the callback, next to the other commands.


Re: CopTools (0.3c) - SpiderWalk - 22.01.2011

hmm i will test it


Re: CopTools (0.3c) - Lukas_Guetta - 22.01.2011

Everything looks like this:

Quote:

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;
}

if(!strcmp(cmdtext, "/ita", true,4))
{
if(playerDB[playerid][specialybe]!=1){SendClientMessage(playerid,0x7DB34DFF,"* Si komanda tik policininkams"); return 1;}
new vardas[MAX_PLAYER_NAME],itarimas[256];
strmid(vardas,GetArgument(1, cmdtext,0),0,MAX_PLAYER_NAME);
itarimas = GetArgument(2, cmdtext,1);
if(!strcmp(vardas, "0", true) || !strcmp(itarimas, "0", true)){SendClientMessage(playerid, 0x0000A890, "* Itarti zaideja: /ita [nick] [itarimas]"); return 1;}
new id = GetPlayeridMid(vardas);
if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid, 0x7DB34DFF, "* Tokio vardo nera"); return 1;}
if (id == playerid){ SendClientMessage(playerid, 0x7DB34DFF, "* Saves itarti negali"); return 1;}
new Float:Coo[3];
GetPlayerPos(id,Coo[0],Coo[1],Coo[2]);
if(!PlayerToPoint(100, playerid, Coo[0],Coo[1],Coo[2])){SendClientMessage(playerid, 0x7DB34DFF, "* Zaidejas per toli, kaip tu gali pamatyti ka jis daro?"); return 1;}
new msg[128],police[MAX_PLAYER_NAME],itar[MAX_PLAYER_NAME];
GetPlayerName(playerid,police,sizeof(police));
GetPlayerName(id,itar,sizeof(itar));
SetPlayerWantedLevel(id,GetPlayerWantedLevel(id)+1 );
format(msg,sizeof(msg),"[racija] %s: pastebejau, kaip %s %s!",police,itar,itarimas);
SendMessageToCops(0x7DB34DFF,msg);
return 1;
}




Re: CopTools (0.3c) - Geso - 23.01.2011

Quote:
Originally Posted by Lukas_Guetta
Посмотреть сообщение
Everything looks like this:
Try this:

pawn Код:
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;
}

if(!strcmp(cmdtext, "/ita", true,4))
{
if(playerDB[playerid][specialybe]!=1){SendClientMessage(playerid,0x7DB34DFF,"* Si komanda tik policininkams"); return 1;}
new vardas[MAX_PLAYER_NAME],itarimas[256];
strmid(vardas,GetArgument(1, cmdtext,0),0,MAX_PLAYER_NAME);
itarimas = GetArgument(2, cmdtext,1);
if(!strcmp(vardas, "0", true) || !strcmp(itarimas, "0", true)){SendClientMessage(playerid, 0x0000A890, "* Itarti zaideja: /ita [nick] [itarimas]"); return 1;}
new id = GetPlayeridMid(vardas);
if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid, 0x7DB34DFF, "* Tokio vardo nera"); return 1;}
if (id == playerid){ SendClientMessage(playerid, 0x7DB34DFF, "* Saves itarti negali"); return 1;}
new Float:Coo[3];
GetPlayerPos(id,Coo[0],Coo[1],Coo[2]);
if(!PlayerToPoint(100, playerid, Coo[0],Coo[1],Coo[2])){SendClientMessage(playerid, 0x7DB34DFF, "* Zaidejas per toli, kaip tu gali pamatyti ka jis daro?"); return 1;}
new msg[128],police[MAX_PLAYER_NAME],itar[MAX_PLAYER_NAME];
GetPlayerName(playerid,police,sizeof(police));
GetPlayerName(id,itar,sizeof(itar));
SetPlayerWantedLevel(id,GetPlayerWantedLevel(id)+1 );
format(msg,sizeof(msg),"[racija] %s: pastebejau, kaip %s %s!",police,itar,itarimas);
SendMessageToCops(0x7DB34DFF,msg);
return 1;
}



Respuesta: CopTools (0.3c) - SuperMarioRol - 29.01.2011

Pastebin Died


Re: Respuesta: CopTools (0.3c) - Geso - 29.01.2011

Quote:
Originally Posted by SuperMarioRol
Посмотреть сообщение
Pastebin Died
I reuploaded it: http://pastebin.com/Gb15wKhh


Re: CopTools (0.3c) - [SFA]SpiRRiT - 06.03.2011

Lol, I don't even understand Lithuanian but still I know what he says!


Re: CopTools (0.3c) - Tee - 08.03.2011

Cool I used it for my DM server .


Re: CopTools (0.3c) - ConsoleX - 13.03.2011

I get these errors
Код:
C:\Users\Marta\Desktop\pawno\new.pwn(34) : warning 217: loose indentation
C:\Users\Marta\Desktop\pawno\new.pwn(38) : error 010: invalid function or declaration
C:\Users\Marta\Desktop\pawno\new.pwn(41) : error 021: symbol already defined: "RemoveItems"
C:\Users\Marta\Desktop\pawno\new.pwn(47) : error 021: symbol already defined: "PutRiotShieldOnBack"
C:\Users\Marta\Desktop\pawno\new.pwn(53) : error 021: symbol already defined: "PutRiotShieldOnArm"
C:\Users\Marta\Desktop\pawno\new.pwn(59) : error 021: symbol already defined: "GiveFlashLight"
C:\Users\Marta\Desktop\pawno\new.pwn(65) : error 021: symbol already defined: "GiveTazer"
C:\Users\Marta\Desktop\pawno\new.pwn(69) : warning 203: symbol is never used: "RemoveItems"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.



Re: CopTools (0.3c) - DrewFArnold - 13.03.2011

Код:
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(5) : error 017: undefined symbol "IsPlayerAttachedObjectSlotUsed"
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(5) : error 017: undefined symbol "RemovePlayerAttachedObject"
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(6) : error 017: undefined symbol "IsPlayerAttachedObjectSlotUsed"
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(6) : error 017: undefined symbol "RemovePlayerAttachedObject"
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(3) : warning 203: symbol is never used: "playerid"
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(3 -- 11) : error 017: undefined symbol "IsPlayerAttachedObjectSlotUsed"
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(3 -- 11) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.



Re: CopTools (0.3c) - Geso - 13.03.2011

Quote:
Originally Posted by DrewFArnold
Посмотреть сообщение
Код:
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(5) : error 017: undefined symbol "IsPlayerAttachedObjectSlotUsed"
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(5) : error 017: undefined symbol "RemovePlayerAttachedObject"
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(6) : error 017: undefined symbol "IsPlayerAttachedObjectSlotUsed"
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(6) : error 017: undefined symbol "RemovePlayerAttachedObject"
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(3) : warning 203: symbol is never used: "playerid"
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(3 -- 11) : error 017: undefined symbol "IsPlayerAttachedObjectSlotUsed"
<PATH-TO>\SA-MP\pawno\include\cop-tools.inc(3 -- 11) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Are you sure you've got the newest includes for your server?

Quote:
Originally Posted by ConsoleX
I get these errors

Код:
C:\Users\Marta\Desktop\pawno\new.pwn(34) : warning 217: loose indentation
C:\Users\Marta\Desktop\pawno\new.pwn(38) : error 010: invalid function or declaration
C:\Users\Marta\Desktop\pawno\new.pwn(41) : error 021: symbol already defined: "RemoveItems"
C:\Users\Marta\Desktop\pawno\new.pwn(47) : error 021: symbol already defined: "PutRiotShieldOnBack"
C:\Users\Marta\Desktop\pawno\new.pwn(53) : error 021: symbol already defined: "PutRiotShieldOnArm"
C:\Users\Marta\Desktop\pawno\new.pwn(59) : error 021: symbol already defined: "GiveFlashLight"
C:\Users\Marta\Desktop\pawno\new.pwn(65) : error 021: symbol already defined: "GiveTazer"
C:\Users\Marta\Desktop\pawno\new.pwn(69) : warning 203: symbol is never used: "RemoveItems"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Can you show me the script you're using it in?


Re: CopTools (0.3c) - ConsoleX - 13.03.2011

Thread seems to be gone, was called Christinia Roleplay if I remember correctly LS version.


Respuesta: CopTools (0.3c) - Code8976Man - 13.03.2011

Thanks, that's very useful.