Weapon cheat - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Weapon cheat (
/showthread.php?tid=77518)
Weapon cheat -
[LNL]Remulis - 11.05.2009
can you help me i neeed script like someone takes minigun for example and he got killed and write message don't cheat
Re: Weapon cheat -
Weirdosport - 11.05.2009
Assuming that 38 is the minigun reasonid..
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(reason == 38)
{
SendClientMessage(killerid, 0xFF00FFAA, "Don't Cheat foo'");
}
return 1;
}
Re: Weapon cheat -
typedef - 12.05.2009
I cant script for shit, so dont take much advice from me but I think you would need something like this, I suck at editing others players games dont feel like learning their functions would rather build it myself.
Sellgun(int playerid, gun[])
{
int guncheck = 0; /// this would actually have to be a global to all of the what ever there called like onconnect disconnect. and then u would need to do a check for like each if(playergetgun)
string mp5 = ///id of it;
/// and so on.
if(playermats[id] < gun[])
{
GivePlayerGun(playerid)
//radius check
if(guncheck[id] != 1)
{
sendclientmessage("You cannot get this gun");
}
{
Or something like that.
Re: Weapon cheat -
DMSOrg - 12.05.2009
Quote:
Originally Posted by typedef
Sellgun(int playerid, gun[])
{
int guncheck = 0; /// this would actually have to be a global to all of the what ever there called like onconnect disconnect. and then u would need to do a check for like each if(playergetgun)
string mp5 = ///id of it;
/// and so on.
if(playermats[id] < gun[])
{
GivePlayerGun(playerid)
//radius check
if(guncheck[id] != 1)
{
sendclientmessage("You cannot get this gun");
}
{
Or something like that.
|
no offense, it's a concept, but that is probably the least consistent code i've ever seen :P
Re: Weapon cheat -
shitbird - 12.05.2009
pawn Код:
public AntiWeaponHack()
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36 || GetPlayerWeapon(i) == 37 || GetPlayerWeapon(i) == 38)
{
Kick(i); // or change to ban, whatever you want it to do.
}
}
}