Whats wrong here?
#7

You have to make a variable.

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
Hope you understood, let me know if you need help.
Reply


Messages In This Thread
Whats wrong here? - by Alex_Obando - 06.06.2011, 02:32
Re: Whats wrong here? - by Backwardsman97 - 06.06.2011, 02:37
Respuesta: Whats wrong here? - by Alex_Obando - 06.06.2011, 02:39
Re: Whats wrong here? - by Calgon - 06.06.2011, 02:40
Re: Whats wrong here? - by grand.Theft.Otto - 06.06.2011, 02:41
Respuesta: Whats wrong here? - by Alex_Obando - 06.06.2011, 02:50
Re: Whats wrong here? - by grand.Theft.Otto - 06.06.2011, 03:17
Re: Whats wrong here? - by Tee - 06.06.2011, 04:51

Forum Jump:


Users browsing this thread: 1 Guest(s)