26.12.2010, 20:33
(
Последний раз редактировалось Mean; 27.12.2010 в 09:30.
Причина: Adding another problem, so I don't spam with creating another topic.
)
So, i've did:
And nothing happens, I want to apply the animation: "BIKEd_hit. Any help would be helpful .
EDIT: Second problem
SOLVED
When I click while in a vehicle, it takes away all my HP, and spawns me.
pawn Код:
dcmd_punch(playerid,params[])
{
#pragma unused params
return ApplyAnimation(playerid, "BIKEd", "BIKEd_hit", 4.0, 0, 0, 0, 0, 0);
}
EDIT: Second problem
SOLVED
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(newkeys == KEY_FIRE)
{
new Float:health;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new string[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 1.0, x, y, z))
{
new pHealth = GetPlayerHealth(i, health);
SetPlayerHealth(i, pHealth-10);
format(string, sizeof(string), "You have been punched by %s", pName);
PlayerPlaySound(i, 1130, 0.0, 0.0, 0.0);
PlayerPlaySound(playerid, 1130, 0.0, 0.0, 0.0);
SendClientMessage(i, 0xFFFF00AA, string);
}
}
}
}
return 1;
}