21.10.2012, 23:41
(
Последний раз редактировалось DrTHE; 22.10.2012 в 20:31.
)
Bem vou ser breve, essa include foi feita com o intuito de o jogador possa usar speed sem usar mods.
Modo de uso:
Simples, adicionar:
abaixo da include a_samp e usar a tecla alt in-game.
Source:
Download:
> logo abaixo nos 'attachments'
Made in China
Modo de uso:
Simples, adicionar:
Код:
#include <sss>
Source:
PHP код:
////////////////////////////////////////////////////////////////////////////////
/*
//////////////////////// Speed sem Sorvete by DrTHE ////////////////////////////
*/
////////////////////////////////////////////////////////////////////////////////
#define oxC Check(playerid)
#define ixC Prepare(playerid)
new e_Timer[MAX_PLAYERS];
new bool:e_Reduzir[MAX_PLAYERS] = false;
new bool:e_OPKST;
public OnGameModeInit()
{
e_OPKST = funcidx(#ExOnPlayerKeyStateChange) != -1;
return CallLocalFunction(#ExOnGameModeInit, #);
}
#if defined _ALS_OnGameModeInit
#undef OnGameModeInit
#else
#define _ALS_OnGameModeInit
#endif
#define OnGameModeInit ExOnGameModeInit
forward ExOnGameModeInit();
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
CallLocalFunction(#Prepare, #d, playerid);
return (e_OPKST ? CallLocalFunction("ExOnPlayerKeyStateChange", "i", playerid) : 1);
}
#if defined _ALS_OnPlayerKeyStateChange
#undef OnPlayerKeyStateChange
#else
#define _ALS_OnPlayerKeyStateChange
#endif
#define OnPlayerKeyStateChange ExOnPlayerKeyStateChange
forward ExOnPlayerKeyStateChange(playerid, newkeys, oldkeys);
forward ixC; public ixC
{
new Keys, ud, lr;
GetPlayerKeys(playerid, Keys, ud, lr);
if(Keys &= 4)
{
if(e_Reduzir[playerid] == false)
{
KillTimer(e_Timer[playerid]);
e_Reduzir[playerid] = true;
e_Timer[playerid] = SetTimerEx(#Check, 200, true, #d, playerid);
return 1;
}
}
return 1;
}
forward oxC; public oxC
{
if(!IsPlayerConnected(playerid))
{
e_Reduzir[playerid] = false;
KillTimer(e_Timer[playerid]);
return 1;
}
new Keys, up, down;
GetPlayerKeys(playerid, Keys, up, down);
if(Keys &= 4)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleVelocity(GetPlayerVehicleID(playerid), x + (x / 4), y + (y / 4), z + (z / 4));
}
}
else
{
e_Reduzir[playerid] = false;
KillTimer(e_Timer[playerid]);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleVelocity(GetPlayerVehicleID(playerid), x - (x / 4), y - (y / 4), z - (z / 4));
}
}
return 1;
}
> logo abaixo nos 'attachments'
Made in China