dini & dudb
#1

how can I make lines like these to dini

pawn Код:
GivePlayerM4(playerid,udb_UserInt(PlayerName(playerid),"M4")-GetPlayerM4(playerid));
             GivePlayerAK(playerid,udb_UserInt(PlayerName(playerid),"AK47")-GetPlayerAK(playerid));
Reply
#2

What do you mean, it would give an M4 that player already has?
You have explained nothing.
Reply
#3

oh sorry for not explaning..

I want to give the M4 a player already has, ive put it under the dialog where it checks the player account exist
Reply
#4

bump..

stocks

pawn Код:
new M4[MAX_PLAYERS];
stock GivePlayerM4(playerid, gun)
{
    M4[playerid] = M4[playerid] + gun;
    return M4[playerid];
}
stock GetPlayerM4(playerid)
{
    return M4[playerid];
}
Reply
#5

bump
Reply
#6

I got no clue how dudb works at all, but this should probably get you going.

pawn Код:
// Define the weapons here : ( The list can be found at : https://sampwiki.blast.hk/wiki/Weapons )
#define AK47 30
#define M4 31

// Stores the current weapon
new Weapon[MAX_PLAYERS];

// Gives the player an weapon
stock GivePlayerGun(playerid, GunID)
{
     Weapon[playerid] = GunID;
}

// Gives the player an M4
stock GivePlayerM4(playerid)
{
     GivePlayerGun(playerid, M4);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)