[SUGGESTION] Inventory System

Hello everyone!, i was scripting a gamemode and i wanted to do some nice inventory system, a little bit different from what you see around. I Recentley played in a server where you got your house, veh key and everything in your inventory. (I'm posting a screen a little bit down the thread) and i wanted to get some advice on how to make a similar system because i really liked it. I Don't need the whole script. Just a little example and some words should be enough.

Screen Here

You will need to create a TextDraw and update the text, just like this example:


pawn Код:
#include <a_samp>
#include <zcmd>

new Text:invTD[MAX_PLAYERS], var[MAX_PLAYERS][3], invTimer[MAX_PLAYERS];

public OnPlayerConnect(playerid){
    invTD[playerid] = TextDrawCreate(240.0,580.0,"Inventory\n");
    TextDrawShowForPlayer(playerid, invTD[playerid]);
    invTimer[playerid] = SetTimerEx("UpdateInvTD", 3000, true, "i", playerid);
    return 1;

public OnPlayerDisconnect(playerid, reason){
    TextDrawHideForPlayer(playerid, invTD[playerid]);
    return 1;

forward UpdateInvTD(playerid);
public UpdateInvTD(playerid){
    new longStr[300];
    if(var[playerid][1] == 1) //change to your vars
        format(longStr, sizeof(longStr), "%sVar 1\n");
    if(var[playerid][2] == 2) //change to your vars
        format(longStr, sizeof(longStr), "%sVar 2");
    TextDrawSetString(invTD[playerid], longStr);

    return 1;

Forum Jump:

Users browsing this thread: 1 Guest(s)