Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

Not sure if my /kick works?

Hi i've written a admin command for /kick and im currently multi logging into my server to test it out.

ID
d6ouivnilegovhg7bpjg
author
crypticsin's avatar

CrypticSin

@crypticsin


View profile
Copy link
  Report member
started
Mar 29, 2021
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Pawn Scripting
Not sure if my /kick works?
crypticsin's avatar

CrypticSin

@crypticsin


View profile
Copy link
  Report member
• 5y
Pawn Scripting

Not sure if my /kick works?

pawn

Hi i've written a admin command for /kick and im currently multi logging into my server to test it out.



Everything seems like it's working when i kick my 2nd character but, it doesn't actually kick the player even though the message comes up that?they've been kicked?



Could this be because im accessing the server on two different accounts with?the same PC and the same IP??



Or if a randomer from a different ip joined would it work??



Code:

CMD:kick(playerid, params[])

{

? ? if(PlayerInfo < 1)

? ? return SCM(playerid, COLOR_RED, "You are not allowed to use this command");



new playerb, reason;

new fstr;

if(sscanf(params, "us", playerb, reason))

? ? return SCM(playerid, COLOR_RED, "Usage: /kick  ");

? ? 

? ? if(!IsPlayerConnected(playerb))

return SendClientMessage(playerid, COLOR_RED, "Player not found.");

? ? 

? ? if(PlayerInfo >= 1)

return SendClientMessage(playerid, COLOR_RED, "You cant kick admins.");

? ? {

? ? ? ? format(fstr, sizeof(fstr), "Admin %s (%d) has kicked %s  from TWDZS - Reason: %s", ReturnName(playerid), playerid, ReturnName(playerb), playerb, reason);

? ? ? ? SendClientMessageToAll(COLOR_RED, fstr);

? ? ? ? PlayerInfo ;

? ? ? ? GameTextForPlayer(playerb, "~r~Kicked", 5000, 5);

? ? ? ? format(fstr, sizeof(fstr), "You have been kicked from TWDZS. You were kicked by admin %s.", ReturnName(playerid));

? ? ? ? SendClientMessage(playerb, COLOR_RED, fstr);

? ? ? ? SendClientMessage(playerb, COLOR_ORANGE, "If you think this kick is unfair complain at www.domain.net");

? ? ? ? KickEx(playerb);

? ? }

? ? return true;

}
0 likes0 replies

    Please sign up or log in to reply