SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 13/07/2017, 10:29 AM   #1
Crackerz
Little Clucker
 
Join Date: Jun 2017
Posts: 34
Reputation: 0
Default Kicking player

hey guys, I was trying add a system of kicking when the server says the person is possibily hacking,
But I face error :
Code:
error 035: argument type mismatch (argument 1)
My code :

PHP Code:
    if(GetPlayerState(i) == PLAYER_STATE_DRIVER && AdminDuty[i] != && !IsAPlane(GetPlayerVehicleID(i))) {
              new 
Float:fCurrentSpeed;
              
fCurrentSpeed player_get_speed(i);
              
fVehSpeed[i] = fCurrentSpeed;
            if(
fCurrentSpeed 200) {
                new 
string[74 MAX_PLAYER_NAME];
                   
format(stringsizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) may possibly be speed hacking (%.0f MPH)."GetPlayerNameEx(i), ifCurrentSpeed);
                   
Kick("%d"); //<<<<<ERRROR LINE!
                   
ABroadCast(COLOR_YELLOWstring1);
                   
SetPVarInt(i"shW"GetPVarInt(i"shW")+1);

                   if(
GetPVarInt(i"shW") >= 3) {
                       
format(stringsizeof(string), "%s may possibly have speed hacked (speeds of %.0f MPH)."GetPlayerNameEx(i), fCurrentSpeed);
                       
AddAutomatedFlag(istring);
                   }
            }
        } 
Crackerz is offline   Reply With Quote
Old 13/07/2017, 10:38 AM   #2
StrikerZ
High-roller
 
StrikerZ's Avatar
 
Join Date: Mar 2016
Location: Asgard
Posts: 1,050
Reputation: 154
Default Re: Kicking player

Code:
Kick(i);
__________________
StrikerZ is offline   Reply With Quote
Old 13/07/2017, 02:05 PM   #3
GuilhermeNunes
Gangsta
 
Join Date: Feb 2017
Posts: 550
Reputation: 8
Default Re: Kicking player

Coloque Kick(playerid); no final
GuilhermeNunes is offline   Reply With Quote
Old 13/07/2017, 02:07 PM   #4
StrikerZ
High-roller
 
StrikerZ's Avatar
 
Join Date: Mar 2016
Location: Asgard
Posts: 1,050
Reputation: 154
Default Re: Kicking player

Quote:
Originally Posted by GuilhermeNunes View Post
Coloque Kick(playerid); no final
He's using a loop, not any function which has playerid. He's looping by "i" variable, so it's
PHP Code:
Kick(i); 
__________________
StrikerZ is offline   Reply With Quote
Old 13/07/2017, 02:23 PM   #5
Meller
Banned
 
Join Date: Dec 2016
Posts: 578
Reputation: 132
Default Re: Kicking player

Your code doesn't make any sense at all.

Kick("%d");
Why even attempt using a formatted text in a string where's there no other params? Why even obhter placing a string on an int?


SetPVarInt(i, "shW", GetPVarInt(i, "shW")+1);
You do realize you just kicked player I? He wont have his virtualworld set depending on his net.

AddAutomatedFlag(i, string);
Still, he was kicked for fucks sake.
Meller is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kicking player because they logon. iLearner Server Support 8 22/08/2016 10:31 AM
kicking player CH | FuDo Scripting Help 6 04/08/2013 09:41 PM
[Help] Kicking a player Maxips2 Scripting Help 3 28/10/2012 11:49 AM
kicking player during... P<3TS Scripting Help 13 03/08/2012 06:45 AM
Not kicking player from vehicle? Torran Help Archive 8 10/03/2010 03:32 PM


All times are GMT. The time now is 09:40 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.