I need help with my Anti Jet Pack script. - 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: I need help with my Anti Jet Pack script. (
/showthread.php?tid=402642)
I need help with my Anti Jet Pack script. -
Magic_Time - 27.12.2012
Hi, I need please help me with this script, I need to know if it really will work, and if there is a better way to do.
PHP код:
stock JetPackHacks(playerid)
{
new str[256];
new str2[256];
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
format(str, sizeof(str)),"Player: %s has been banned to Jetpack Hacks",GetPlayerName(playerid);
SendClientMessageToAll(COLOR_RED, str);
Ban(playerid);
}
else if(IsPlayerAdmin(playerid))
{
format(str2, sizeof(str2)),"Administrator: %s is now using a Jetpack", GetPlayerName(playerid};
SendClientMessageToAll(COLOR_NAVY, str2);
return 1;
}
Re: I need help with my Anti Jet Pack script. -
rbush12 - 27.12.2012
Do you get any errors when compiling
Re: I need help with my Anti Jet Pack script. -
Magic_Time - 27.12.2012
No, I don't.
I need to know if it really will work, and if there is a better way to do.
Re: I need help with my Anti Jet Pack script. -
Threshold - 27.12.2012
First of all, this will ban admins.
pawn Код:
stock JetPackHacks(playerid)
{
new str[256];
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
if(!IsPlayerAdmin(playerid))
{
format(str, sizeof(str)),"Player: %s has been banned to Jetpack Hacks",GetPlayerName(playerid);
SendClientMessageToAll(COLOR_RED, str);
Ban(playerid);
}
else
{
format(str2, sizeof(str)),"Administrator: %s is now using a Jetpack", GetPlayerName(playerid};
SendClientMessageToAll(COLOR_NAVY, str);
}
}
return 1;
}
The above code should work.
Re: I need help with my Anti Jet Pack script. -
Magic_Time - 27.12.2012
The function of this script will be ban players that are using JetPack With the only exception administrators.
PHP код:
stock JetPackHacks(playerid)
{
new str[256];
new str2[256];
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
format(str, sizeof(str)),"Player: %s has been banned to Jetpack Hacks",GetPlayerName(playerid);
SendClientMessageToAll(COLOR_RED, str);
Ban(playerid);
}
else if(IsPlayerAdmin(playerid))
{
format(str2, sizeof(str2)),"Administrator: %s is now using a Jetpack", GetPlayerName(playerid};
SendClientMessageToAll(COLOR_NAVY, str2);
return 1;
}