04.05.2016, 19:29
PHP Code:
#include <a_samp>
#include <zcmd>
#define FILTERSCRIPT
new jumping[MAX_PLAYERS];
new activate[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("Werewolf System");
}
public OnFilterScriptExit()
{
print("Werewolf System");
}
CMD:shift(playerid, params[])
{
SetPlayerSkin(playerid, 0);
SetPlayerArmour(playerid, 1000);
SetPlayerHealth(playerid, 1000);
SetPlayerName(playerid, "Werewolf");
SetPlayerColor(playerid, 0x0000FFAA);
GivePlayerWeapon(playerid, 1, 1);
SendClientMessage(playerid, 0x0000FFAA, "You have transform to a Werewolf");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
jumping[playerid] = 0;
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(activate[playerid] == 1)
{
if(newkeys == KEY_JUMP && jumping[playerid] == 0)
{
jumping[playerid] == 1;
{
new Float:werewolf_jump[3];
GetPlayerVelocity(playerid, werewolf_jump[0], werewolf_jump[1], werewolf_jump[2]);
SetPlayerVelocity(playerid, werewolf_jump[0]+100, werewolf_jump[1]+100, werewolf_jump[2]+100);
}
}
}
return 1;
}