Help with command
#1

I am trying to make command /givepackage [playerid] [slot(1-12)] which will first check if player who is giving package has something on slot he wrote in cmd, and then give that package to first empty slot on giveplayerid.. I got one idea, but it will took 2 years to make that because its around 12000 lines...
Reply
#2

I am in need of function to get first empty slot..
Reply
#3

How do you expect us to help you if you don't have code?

PHP код:
IsSlotEmpty(playeridindex) {
    switch(
index) {
        case 
1: return plyInfo[playerid][pSlot1] == 0;
        case 
2: return plyInfo[playerid][pSlot2] == 0;
        case 
3: return plyInfo[playerid][pSlot3] == 0;
        case 
4: return plyInfo[playerid][pSlot4] == 0;
        case 
5: return plyInfo[playerid][pSlot5] == 0;
        case 
6: return plyInfo[playerid][pSlot6] == 0;
        default: return 
false;
    }

Something like this
Reply
#4

Thanks, I will try this
Reply
#5

I am getting warning function "IsSlotEmpty" should return a value
Reply
#6

You should return it
Reply
#7

I fixed everything after trying a lot of different things...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)