16.08.2013, 21:14
Let me add your code to the topic, this will allow people to help you easier
pawn Код:
public OnPlayerUpdate(playerid)
{
//Money hack checker
if(IsPlayerConnected(playerid))
{
if(GetPlayerMoney(playerid) >= MAX_MONEY)
{
if(Check[playerid] == 0)
{
SetTimerEx("MoneyHackTimer", 60000, 1, "i", playerid);
KillTimer(MoneyHackTimer(playerid));
Check[playerid] = 1;
}
}
if(GetPlayerSpeed(playerid) >= MAX_SPEED)
{
if(Check1[playerid] == 0)
{
SetTimerEx("SpeedHackTimer", 30000, 1, "i", playerid);
KillTimer(SpeedHackTimer(playerid));
Check1[playerid] = 1;
}
}
if(GetPlayerWeapon(playerid) == 38)
{
if(Check2[playerid] == 0)
{
SetTimerEx("WeaponHackTimer", 30000, 1, "i", playerid);
KillTimer(WeaponHackTimer(playerid));
Check2[playerid] = 1;
}
}
}
return 1;
}
forward MoneyHackTimer(playerid);
public MoneyHackTimer(playerid)
{
new string[256], string2[256];
format(string, sizeof(string), " %s (ID: %d) is a possible money hacker!", GetName(playerid), playerid);
format(string2, sizeof(string2),"Money: $%d!", GetPlayerMoney(playerid));
printf(string);
printf(string2);
return 1;
}
forward SpeedHackTimer(playerid);
public SpeedHackTimer(playerid)
{
new string[256], string2[256];
format(string, sizeof(string), "%s (ID: %d) is a possible speed hacker!", GetName(playerid), playerid);
format(string2, sizeof(string2),"Speed: %d KMH!", GetPlayerSpeed(playerid));
printf(string);
printf(string2);
return 1;
}
forward WeaponHackTimer(playerid);
public WeaponHackTimer(playerid)
{
new string[256], string2[256];
format(string, sizeof(string), "%s (ID: %d) is a possible Minigun hacker!", GetName(playerid), playerid);
format(string2, sizeof(string2),"Ammo: %d bullets!", GetPlayerAmmo(playerid));
printf(string);
printf(string2);
return 1;
}
stock GetName(playerid)
{
new pnameid[24];
GetPlayerName(playerid,pnameid,24);
return pnameid;
}
stock GetPlayerSpeed(playerid)
{
new Float:ST[4];
if(IsPlayerInAnyVehicle(playerid))
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
return floatround(ST[3]);
}