i dont know how to make save gun,help me plz!!
#1

hello!everybody hello!
i dont know how to make save gun in my gamemode,but my gamemode have some this:
pgun1-pgun12 and my scriptfiles have :Gun1=0 - Gun12=0 ,plz help me,add my skype:Smith_Jim2,fix it,i ill give you my gamemode!
And!if you can,plz make my gamemode have house pickup Icon,and have some like:house owner:***....on Icon.
like Revon's Rp..thats best!
Reply
#2

If you want to save player score, gun etc, then try using Y_ini
Reply
#3

how?i have YSI,too may inc,which YSI.own?
Reply
#4

Find some TUT on y_ini or get an admin script which saves guns, scores etc
Reply
#5

sry i am noob,i dont know how to ...
and i do something just now:i change scriptfiles user's Gun=0 to Gun=31,then i online,i got m4,but how to make player offline to save gun ?
Reply
#6

What do you mean?

Do you want to open his user file when he is offline and edit his "Gun=0" ?
Reply
#7

Like when he offline have m4,and change his user file Gun=31
i ill save his offline gun
Reply
#8

Here is an example :

PHP код:
CMD:changeweapon(playerid,params[])
{
    new 
fstring[128], name[128], value;
    if(
sscanf(params"s[128]i"name,value)) return SendClientMessage(playerid, -1"Correct Usage: /changeweapon [Player's Name] [New Weapon]");
    
format(fstring,sizeof(fstring), "Users/%s.ini"name);
    if(!
fexist(fstring)) return SendClientMessage(playerid, -1"The account you've typed in doesn't exist");
    if(
value || value 46) return SendClientMessage(playerid, -1"Weapon ID's are ranged from 1 to 46");
    else
    {
        new 
INI:file INI_Open(fstring);
        
INI_SetTag(file"test"); //Change "test" to your tag that you have when someone registers.
        
INI_WriteInt(file"Weapon"value);//Writing our integer in our .ini file.
        
INI_Close(file);//Closing our .ini File
        
new string[128];
        
format(string,sizeof(string), "You have changed %s's weapon to %i"name,value);
        
SendClientMessage(playerid,-1,string);
    }
    return 
1;

Reply
#9

thank you
Reply
#10

What is wrong with it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)