-
Sziasztok!Szeretnék kérni egy láblövés scriptet.Nos ha lábon lövik az illetőt animba essen.Előre is köszi a segítséget
-
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart) {
if(damagedid != INVALID_PLAYER_ID) {
if(bodypart == 5 || bodypart == 6) {
// Animációba esés
}
}
return 1;
}
-
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart) {
if(damagedid != INVALID_PLAYER_ID) {
if(bodypart == 5 || bodypart == 6) {
ApplyAnimation(playerid, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
}
}
return 1;
}
Így nem jó.Most lehet én rontottam el de nem esik animba.Esetleg valami injured vagy Crack animot tudsz oda rakni?Vagy valami fegyver id-t oda kell tenni?
-
ApplyAnimation(playerid
helyett:
ApplyAnimation(damagedid
-
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart) {
if(damagedid != INVALID_PLAYER_ID) {
if(bodypart == 5 || bodypart == 6) {
ApplyAnimation(damagedid, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
}
}
return 1;
}
Így sem esik animba..
-
OnPlayerTakeDamage
Ezt kéne használni.. :D
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID )
{
if(bodypart == 5 || bodypart == 6)
{
ApplyAnimation(playerid, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
}
}
return 1;
}
De ne öljetek meg ha rossz, két éve pawno nélkül, egy jegyzet tömbe érted :D
-
error 025: function heading differs from prototype
error 021: symbol already defined: \"OnPlayerTakeDamage\"
-
Már egyszer szerepel ez az eljárás. Keresd ki és illeszd be alá az általam leírtat. :) Csak figyelj arra, hogy helyesen legyen..
Ha nem megy illeszd be és megcsinálom :)
-
//====Fejlövés=== LÁB lövés====
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID && (weaponid == 34 || weaponid == 33 || weaponid == 24 || weaponid == 31 || weaponid == 30) && bodypart == 9)
{
SetPlayerHealth(playerid, 0.0);
new stringa[MAX_PLAYER_NAME+40];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
//format(stringa, sizeof(stringa), \"[ ! ] Fejbe lőttek\", name);
SendClientMessageToAll(0xFFFF00FF,stringa);
}
return 1;
}
public OnPlayerTakeDamage(playerid, damagedid, Float:amount, weaponid, bodypart) {
if(damagedid != INVALID_PLAYER_ID) {
if(bodypart == 5 || bodypart == 6) {
ApplyAnimation(damagedid, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
}
}
return 1;
}
-
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID && (weaponid == 34 || weaponid == 33 || weaponid == 24 || weaponid == 31 || weaponid == 30) && bodypart == 9)
{
SetPlayerHealth(playerid, 0.0);
new stringa[MAX_PLAYER_NAME+40];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
//format(stringa, sizeof(stringa), \"[ ! ] Fejbe lőttek\", name);
SendClientMessageToAll(0xFFFF00FF,stringa);
}
if(issuerid != INVALID_PLAYER_ID && ((bodypart == 5 || bodypart == 6)))
{
ApplyAnimation(playerid, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
}
return 1;
}
Ezzel cseréld ki az egész sort amit bemásoltál :)
-
még mindig az a hiba
-
Hogy? Amit leírtál, az lehetetlen. Küld el privát üzenetbe a játékmódot mostmár megnézem..
-
Nem errorozik viszont nem jó...
-
Nem \"esik\" animba?
-
Mindj kiderül most küldtem el neki a módot, melyben megcsináltam
-
Hát nem \"esik\" animba
-
Szerintem az animációban lesz a hiba. Nem írtál el valamit benne, vagy letesztelted egy paranccsal hogy működik?
-
Egy SCM-et tolj már az anim alá kíváncsi vagyok, hogy egyáltalán le fut-e?
Re: Megoldottam