mache ich gerade schon
a cool danke, kannst du mir dann alles per PN schicken ?
mache ich gerade schon
a cool danke, kannst du mir dann alles per PN schicken ?
Kannst auch hier posten, wenn du willst.
Ja kann er, er solls mir nur auch per PN schicken ist wegen dem einfügen und allem einfacher als hier.
wie lange soll der betrofende getazert werden
15 sek.
hier habe ich nicht getestet hoffentlich geht es
//Ein Tazer Script für FabiX von Piet
//mit 15sek Tazer
//15 sek anti schuss
//und AntiTazerHack
#include <a_samp>
#define F 0xFFFFFFFF
#define BULLE 3//hier deine Bullen Fraktions id einfügen
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\nTazer Special by Piet_Meier\n");
SetTimer("AntiHack", 1000, 1);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/tazer", cmdtext, true) == 0)
{
if(!isPlayerInFrakt(playerid, BULLE))return SendClientMessage(playerid, F, "Du bist kein Bulle");
GivePlayerWeapon(playerid, 23, 1);
SetPVarInt(playerid, "Tizer", 1);
return 1;
}
return 0;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid!=INVALID_PLAYER_ID)//ist der betroffende nicht du
{
if(weaponid==23)//welche waffe also jetzt die 23 Silencer
{
if(isPlayerInFrakt(playerid, BULLE))//Deine Fraktionsvariable hier eintragen
{
TazerTake(playerid, issuerid);//gehe zu stock TazerTake
}
}
}
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys==KEY_FIRE)
{
if(GetPVarInt(playerid, "Tizer")==1)
{
SetPVarInt(playerid, "Tizer", 0);
SetTimer("Waffe", 15000, 0);
}
}
return 1;
}
forward Waffe(playerid);
public Waffe(playerid)
{
SetPVarInt(playerid, "Tizer", 1);
GivePlayerWeapon(playerid, 23, 1);
return 1;
}
forward AntiHack();
public AntiHack()
{
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(GetPVarInt(i, "Tazered")==1)
{
TogglePlayerControllable(i, 0);
}
}
}
return 1;
}
stock TazerTake(playerid, id)//hier der TazerTake Stock
{
new P[128], T[128];
format(P, 128, "Du Tazerst %s für 15 sek", SpielerName(id));
format(T, 128, "%s Tazert dich für 15 sek", SpielerName(playerid));
SendClientMessage(playerid, F, P);
SendClientMessage(id, F, T);
SetPVarInt(id, "Tazered", 1);
TogglePlayerControllable(id, 0);
SetTimerEx("Tazer", 15000, 0, "i", id);
return 1;
}
forward Tazer(i);
public Tazer(i)
{
SetPVarInt(i, "Tazered", 0);
TogglePlayerControllable(i, 1);
return 1;
}
stock SpielerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
return name;
}
stock isPlayerInFrakt(playerid,fraktid)
{
if(GetPVarInt(playerid,"Fraktion")==fraktid)return 1;
return 0;
}
MFG Piet
1 Warning: warning 235: public function lacks forward declaration (symbol "OnPlayerTakeDamage")
Zeile:public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
welche version benutzt du denn
du brauchst dafür 0.3d
//edit habe fehler gefunden
hier die neue version
//Ein Tazer Script für FabiX von Piet_Meier
//mit 15sek Tazer
//15 sek anti schuss
//und AntiTazerHack
#include <a_samp>
#define F 0xFFFFFFFF
#define BULLE 3//hier deine Bullen Fraktions id einfügen
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\nTazer Special by Piet_Meier\n");
SetTimer("AntiHack", 1000, 1);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/tazer", cmdtext, true) == 0)
{
if(!isPlayerInFrakt(playerid, BULLE))return SendClientMessage(playerid, F, "Du bist kein Bulle");
if(GetPVarInt(playerid, "Waffehabe")==1)return SendClientMessage(playerid, F, "Warte 15 sek");
GivePlayerWeapon(playerid, 23, 1);
SetPVarInt(playerid, "Tizer", 1);
return 1;
}
return 0;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid!=INVALID_PLAYER_ID)//ist der betroffende nicht du
{
if(weaponid==23)//welche waffe also jetzt die 23 Silencer
{
if(isPlayerInFrakt(playerid, BULLE))//Deine Fraktionsvariable hier eintragen
{
if(GetPVarInt(playerid, "Tizer")==1)
{
TazerTake(playerid, issuerid);//gehe zu stock TazerTake
}
}
}
}
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys==KEY_FIRE)
{
if(GetPVarInt(playerid, "Tizer")==1)
{
SetPVarInt(playerid, "Tizer", 0);
SetTimerEx("Waffe", 15000, 0, "i", playerid);
}
}
return 1;
}
forward Waffe(i);
public Waffe(i)
{
SetPVarInt(i, "Tizer", 1);
GivePlayerWeapon(i, 23, 1);
SetPVarInt(i, "Waffehabe", 0);
return 1;
}
forward AntiHack();
public AntiHack()
{
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(GetPVarInt(i, "Tazered")==1)
{
TogglePlayerControllable(i, 0);
}
}
}
return 1;
}
stock TazerTake(playerid, id)//hier der TazerTake Stock
{
new P[128], T[128];
format(P, 128, "Du Tazerst %s für 15 sek", SpielerName(id));
format(T, 128, "%s Tazert dich für 15 sek", SpielerName(playerid));
SendClientMessage(playerid, F, P);
SendClientMessage(id, F, T);
SetPVarInt(id, "Tazered", 1);
TogglePlayerControllable(id, 0);
SetTimerEx("Tazer", 15000, 0, "i", id);
return 1;
}
forward Tazer(i);
public Tazer(i)
{
SetPVarInt(i, "Tazered", 0);
TogglePlayerControllable(i, 1);
return 1;
}
stock SpielerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
return name;
}
stock isPlayerInFrakt(playerid,fraktid)
{
if(GetPVarInt(playerid,"Fraktion")==fraktid)return 1;
return 0;
}
schua bitte PN an