06.06.2011, 03:17
You have to make a variable.
Just pretend this is your minigun game:
Hope you understood, let me know if you need help.
Just pretend this is your minigun game:
pawn Код:
// top of script
new inmg[MAX_PLAYERS]; // mg = minigun (in minigun)
// command
if(strcmp(cmdtext, "/mg", true, 3) == 0)
{
// give the minigun, send messages, other codes here, blabla
inmg[playerid] = 1;
return 1;
}
// onplayerdeath
if(GetPlayerWeapon(killerid) == 38 && inmg[playerid] != 1) //
{
new name[MAX_PLAYER_NAME];
new str[128];
GetPlayerName(killerid, name, sizeof(name));
format(str, sizeof(str),"%s is suspected of having a weapon hack (Minigun).", name);
SendClientMessageToAdmins(0xFFFFFFAA, string);
}
return 1;
}
// ! means NOT as a short form
// != NOT equal to
// so therefore: if they are NOT in mg, it will show, but if they are, it wont show

