[Include] CopTools (0.3c)
#21

Is the riot shield bulletproof?
Reply
#22

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.
Reply
#23

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

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....?
Reply
#25

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;
}
Reply
#26

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?
Reply
#27

bump
Reply
#28

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.
Reply
#29

hmm i will test it
Reply
#30

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

Reply
#31

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;
}
Reply
#32

Pastebin Died
Reply
#33

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

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

Cool I used it for my DM server .
Reply
#36

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.
Reply
#37

Код:
<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.
Reply
#38

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?
Reply
#39

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

Thanks, that's very useful.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)