Car Swinging Problem - 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: Car Swinging Problem (
/showthread.php?tid=373869)
Car Swinging Problem -
UnknownGamer - 31.08.2012
Hi guys,
I'm using a filter-script, for a car-swing anti-cheat, How do you define a username in a filter-script?
Код:
public OnPlayerCleoDetected( playerid, cleoid )
{
switch( cleoid )
{
case CLEO_FAKEKILL:
{
SendClientMessage( playerid, -1, "You are fake killing." );
BanEx( playerid, "Fake kill" );
}
case CLEO_CARWARP:
{
SendClientMessage( playerid, -1, "You are car warping." );
BanEx( playerid, "Car Warp" );
}
case CLEO_CARSWING:
{
SendClientMessage( playerid, -1, "You are car swinging" );
new string[256], csName[MAX_PLAYER_NAME];
format(string, sizeof(string),"%s has been banned for Car Swinging.", csName);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
}
case CLEO_CAR_PARTICLE_SPAM:
{
SendClientMessage( playerid, -1, "You are partical spamming" );
BanEx( playerid, "Car Particle Spam" );
}
}
return 1;
}
Doesn't work.
Re: Car Swinging Problem -
Jefff - 01.09.2012
pawn Код:
GetPlayerName(playerid,csName,MAX_PLAYER_NAME);
Re: Car Swinging Problem -
MarkoN - 01.09.2012
pawn Код:
new name[MAX_PLAYER_NAME];
then you need to get it
pawn Код:
GetPlayerName(playerid, name, sizeof(name));