18.12.2010, 21:18
Is the riot shield bulletproof?
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; }
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: {
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;
}
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; } |
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;
}
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.
<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.
Код:
<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. |
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. |