help with my new FS
#1

hi all,

i am doing new FS for samp "Mariuana Fields"
...
here is codehttp://pastebin.com/qKUXyZJL
all works fine if is field free show me dialog
PHP код:
ShowPlayerDialog(playerid,DIALOG_MARIJUANA_BUY,DIALOG_STYLE_MSGBOX,"Marijuana Field","Are you want buy this marijuana field for 60 000$?","Yes","No"); 
but when i bought it text label updated my name but when i went to other free field dont showed me DIALOG_MARIJUANA_BUY... nothing... and in my bought field too nothing may show this
PHP код:
PlayerInfo[playerid][Marijuana] += MarijuanaGrams[i];
                new 
str[50];
                
format(str,50,"You got %d grams of marijuana",MarijuanaGrams[i]);
                
GameTextForPlayer(playerid,str10005);
                
MarijuanaGrams[i] = 0
and add one gram of marijuana in one minute.

can someone help me? what is wrong... when it will be fixed ill submit topic Marijuana FS with your help thank
Reply
#2

From the second code, try this instead:

pawn Код:
PlayerInfo[playerid][Marijuana] += MarijuanaGrams[i];
                new str[50];
                format(str,50,"You got %d grams of marijuana",MarijuanaGrams[i]);
                GameTextForPlayer(playerid,str, 1000, 5);
I removed this:

pawn Код:
MarijuanaGrams[i] = 0;
Which resets the player's quantity of Marijuana back to 0 automatically, you don't need that.
Reply
#3

Quote:
Originally Posted by DanishHaq
Посмотреть сообщение
From the second code, try this instead:

pawn Код:
PlayerInfo[playerid][Marijuana] += MarijuanaGrams[i];
                new str[50];
                format(str,50,"You got %d grams of marijuana",MarijuanaGrams[i]);
                GameTextForPlayer(playerid,str, 1000, 5);
I removed this:

pawn Код:
MarijuanaGrams[i] = 0;
Which resets the player's quantity of Marijuana back to 0 automatically, you don't need that.
no its not the problem it works good... problem is that when i bought field is not save only update text label and when i pickup in field N.0... i got nothing but in field 19 where is Nobody i got marijuana grams.... SO?
Reply
#4

Nobody?
Reply
#5

Show the whole code in DIALOG_MARIJUANA_BUY
Reply
#6

here is code of all... http://pastebin.com/qKUXyZJL

but is missing includes.. because fist i making it for gamemode
Reply
#7

Is file saving when you buy ? like Real_World/Marijuana/ID.txt
Reply
#8

Quote:
Originally Posted by iJumbo
Посмотреть сообщение
Is file saving when you buy ? like Real_World/Marijuana/ID.txt
no this doesnt work too
Reply
#9

Are you sure there is files? you create files if there is no file? or the dir patch is correct?
Reply
#10

ah... stock CreateMarijuana works fine

Marijuana folder exist and after first luch files will be created Real_World/Marijuana/0.txt
Real_World/Marijuana/1.txt ... Real_World/Marijuana/19.txt
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)