Hayhou, kann mir eventuell bei diesem Tazer-System jemand helfen? :>
/*
Tazer system by Blunt, 16/01/2014
Features:
*Synced shots with the new SA-MP 0.3z update.
*Sleek and smartly designed.
*Basic injured system after shot by Tazer.
*/
//====================================================
#define FILTERSCRIPT
#include <a_samp>
#include <ZCMD>
//====================================================
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_FADE 0xC8C8C8C8
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_YELLOW 0xDABB3E00
#define COLOR_BLACK 0x000000AA
#define COLOR_BLUE 0x1E90FFAA
#define COLOR_PINK 0xFF1493AA
#define COLOR_GREEN 0x006400AA
#define COLOR_ORANGE 0xFF4500AA
#define COLOR_RED 0xFF0000AA
//====================================================
new HasTazer[MAX_PLAYERS], BeenTazered[MAX_PLAYERS], WEAPON;
forward BeenTazeredTimer(playerid, issuerid, damagedid);
forward OnPlayerChangeWeapon(playerid, oldweapon, newweapon);
public BeenTazeredTimer(playerid, issuerid, damagedid)
{
BeenTazered[playerid] = 1;
}
public OnPlayerChangeWeapon(playerid, oldweapon, newweapon)
{
if(HasTazer[playerid] == 1)
{
GivePlayerWeapon(playerid, 23, 5000000); // If player tries changing weapon with a tazer, gives him back the tazer weapon.
}
return 1;
}
stock GetName(playerid)
{
new Name[MAX_PLAYER_NAME];
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, Name, sizeof(Name));
}
return Name;
}
stock GiveTazer(playerid)
{
GivePlayerWeapon(playerid, 23, 5000000); // UNLIMITED AMMUNITION
HasTazer[playerid] = 1;
SendClientMessage(playerid, COLOR_WHITE, "INFO: Tazer switched: [ON]");
}
stock TakeTazer(playerid)
{
HasTazer[playerid] = 0;
SendClientMessage(playerid, COLOR_WHITE, "INFO: Tazer switched: [OFF]");
}
//====================================================
public OnFilterScriptInit()
{
print("");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
main()
{
}
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
new string[128];
new Float:health = GetPlayerHealth(playerid, health);
if(HasTazer[issuerid] == 1) // Checks if the player has been shot by a player with a tazer in-hand.
{
SetPlayerHealth(playerid, health);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
format(string,sizeof(string),"INFO: Du wurdest von %s getazed!", GetName(issuerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SetTimer("BeenTazeredTimer", 6000, 0);
}
return 1;
}
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
{
new string[128];
if(HasTazer[playerid] == 1) // Checks if the player who gives the damage has a tazer in-hand.
{
format(string,sizeof(string),"INFO: Du hast deinen Tazer abgeschossen und %s getroffen!.", GetName(damagedid));
SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
//====================================================
COMMAND:getup(playerid, params[])
{
switch ( BeenTazered[playerid] )
{
case 0: // If the players tazer timer is expired.
{
ApplyAnimation(playerid,"PED","getup",4.0,0,0,0,0,0);
}
case 1: { SendClientMessage(playerid, COLOR_GREY, "INFO: Du musst 60 Sekunden warten um diesen Befehl zu nutzen."); }
}
return 1;
}
COMMAND:tazer(playerid, params[])
{
new weapons[13][2];
for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}
if(weapons[2][0] == 23) { WEAPON = 23; }
if(HasTazer[playerid] == 0)
{
GiveTazer(playerid);
}
else
{
TakeTazer(playerid);
GivePlayerWeapon(playerid, WEAPON, 100);
}
return 1;
}
wenn ich es compilen möchte, kommt folgendes:
C:\Users\Julian\Downloads\tazersystem.pwn(89) : error 025: function heading differs from prototype
C:\Users\Julian\Downloads\tazersystem.pwn(104) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
Ich habe die SuFu bereits benutzt, aber das zeug mit Forward oder so ging nicht