SA-MP Forums Archive
Help me plz - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me plz (/showthread.php?tid=608471)



Help me plz - keyvanik - 01.06.2016

Hi i want this flyhack send admins warn i do anything but not work i dont want ban player i want just send admin warn and if you have a flyhack detect in car plz give it too this not work on car

PHP код:
public OnPlayerUpdate(playerid)
{
    if(
GetPlayerAnimationIndex(playerid))
    {
    new 
animlib[32];
    new 
animname[32];
    
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
    if(
strcmp(animlib, "SWIM", true) == 0)
    {
    new 
Float:X,Float:Y,Float:Z;
    
GetPlayerPos(playerid,X,Y,Z);
    if(
Z >= 8.45)
    {
    if(!
IsPlayerInRangeOfPoint(playerid,37.85,1964.0404,-1199.6774,17.4400))
    {
    
dives[playerid] = 1;
    }
    }
    }
    
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
    if(
strcmp(animname, "FALL_FALL", true) == 0)
    {
    new 
Float:X,Float:Y,Float:Z;
    
GetPlayerPos(playerid,X,Y,Z);
    
SetPVarFloat(playerid,"Float",Z);
    
SetTimer("Checkhim",1200,false);
    }
    }
    new 
index = GetPlayerAnimationIndex(playerid);
    if(
index >= 958 && index <= 962)
    {
    if(
GetPlayerWeapon(playerid) != 46)
    {
    
dives[playerid] = 1;
    }
    }
    if(
dives[playerid] == 1)
    {
    
SendClientMessage(playerid,0xC30000FF,"You are banned Reason: Flyhack");
    
Ban(playerid);
    for(new 
i = 0; i < MAX_PLAYERS; i++)
    {
    if(
IsPlayerAdmin(i))
    {
    new 
string[100];
    new 
name[100];
    
format(string,sizeof(string),"%s has been banned Reason: Flyhack",GetPlayerName(playerid,name,sizeof(name)));
    
SendClientMessage(i,0xC30000FF,string);
    }
    }
    }
    return 
1;
} 



Re: Help me plz - Sithis - 01.06.2016

Learn to indent your code first, then come back asking for help.


Re: Help me plz - keyvanik - 01.06.2016

Quote:
Originally Posted by Sithis
ПоÑмотреть Ñообщение
Learn to indent your code first, then come back asking for help.
if you dont want help you can dont send post and dont send spam


Re: Help me plz - Deroxi - 01.06.2016

@keyvanik He is right


Re: Help me plz - Dayrion - 01.06.2016

Quote:
Originally Posted by keyvanik
ПоÑмотреть Ñообщение
if you dont want help you can dont send post and dont send spam
There is no intendation, it's illegible. How are we supposed to help you like this? And by the way you have to explain your problem.


Re: Help me plz - Micko123 - 02.06.2016

Why you guys always use @pragma tabsize 0?? It is much harder to work

And how it is supposed to work in vehicle when you don't check is player in vehicle??