help pickus not saving
#1

PHP код:
stock LoadPics()
{
    new 
str[256];
    for(new 
i1MAX_WEAPSi++)
    {
        if(
PicIDTaken[i] == 0) continue;
        
format(strsizeof(str), "p%d"i);
        
WeapPic[i][wPickupM] = dini_Int(AddDirFile(dir_pickupfilesstr), "PickupModel");
        
WeapPic[i][wX] = dini_Float(AddDirFile(dir_pickupfilesstr), "X");
        
WeapPic[i][wY] = dini_Float(AddDirFile(dir_pickupfilesstr), "Y");
        
WeapPic[i][wZ] = dini_Float(AddDirFile(dir_pickupfilesstr), "Z");
        
WeapPic[i][wInt] = dini_Int(AddDirFile(dir_pickupfilesstr), "Int");
        
WeapPic[i][wWorld] = dini_Int(AddDirFile(dir_pickupfilesstr), "World");
        
WeapPic[i][wAmmo] = dini_Int(AddDirFile(dir_pickupfilesstr), "Ammo");
        
WeapPic[i][wType] = dini_Int(AddDirFile(dir_pickupfilesstr), "Type");
        
WeapPic[i][wPickup] = CreateDynamicPickup(WeapPic[i][wPickupM], WeapPic[i][wType], WeapPic[i][wX], WeapPic[i][wY], WeapPic[i][wZ], WeapPic[i][wWorld],  WeapPic[i][wInt], -170.0);
        
//CreateDynamic3DTextLabel(str, COLOR_YELLOW, WeapPic[idx][wX], WeapPic[idx][wY], WeapPic[idx][wZ], 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
        
PicIDTaken[i] = 1;
    }
    return 
1;
}
SavePics()
{
    new 
str[256];
    for(new 
i1MAX_WEAPSi++)
    {
        if(
PicIDTaken[i] == 0) continue;
        
format(strsizeof(str), "p%d"i);
        
dini_IntSet(AddDirFile(dir_pickupfilesstr), "PickupModel"WeapPic[i][wPickupM]);
        
dini_FloatSet(AddDirFile(dir_pickupfilesstr), "X"WeapPic[i][wX]);
        
dini_FloatSet(AddDirFile(dir_pickupfilesstr), "Y"WeapPic[i][wY]);
        
dini_FloatSet(AddDirFile(dir_pickupfilesstr), "Z"WeapPic[i][wZ]);
        
dini_IntSet(AddDirFile(dir_pickupfilesstr), "Int"WeapPic[i][wInt]);
        
dini_IntSet(AddDirFile(dir_pickupfilesstr), "World"WeapPic[i][wWorld]);
        
dini_IntSet(AddDirFile(dir_pickupfilesstr), "Ammo"WeapPic[i][wAmmo]);
        
dini_IntSet(AddDirFile(dir_pickupfilesstr), "Type"WeapPic[i][wType]);
    }
    return 
1;

PHP код:
CMD:createpic(playeridparams[])
{
    new 
idsamountFloatwPos[3], string[254], type;
     if (
adlvl[playerid] < 5) return 0;
     if(
sscanf(params"ddd"idsamounttype)) return SendClientMessage(playeridCOLOR_WHITE"Usage: /createpic [weaponid] [amount] [type](Best Types: 2 - 23)");
     if(
type || type 23) return SendClientMessage(playeridCOLOR_RED"Error: Available Types: 1-22 ");
    new 
id GetPicAvailableID();
    
GetPlayerPos(playeridwPos[0], wPos[1], wPos[2]);
    
PicIDTaken[id] = 1;
    
WeapPic[id][wX] = wPos[0];
    
WeapPic[id][wY] = wPos[1];
    
WeapPic[id][wZ] = wPos[2];
    
WeapPic[id][wWorld] = GetPlayerVirtualWorld(playerid);
    
WeapPic[id][wInt] = GetPlayerInterior(playerid);
    
WeapPic[id][wPickupM] = GetWeaponModel(ids);
    
WeapPic[id][wAmmo] = amount;
    
WeapPic[id][wType] =  type;
    
WeapPic[id][wPickup] = CreateDynamicPickup(GetWeaponModel(ids), typewPos[0], wPos[1], wPos[2], GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -150.0);
    
format(stringsizeof(string), "You Have Created Pickup ID:%d, Weapon ID:%d, Amount:%d, With ID:%d, Type: %d At Your Location"WeapPic[id][wPickupM],idsWeapPic[id][wAmmo], idtype);
    
SendClientMessage(playeridCOLOR_YELLOWstring);
    
SavePics();
    return 
1;

help please
Reply


Messages In This Thread
help pickus not saving - by BulletRaja - 21.01.2018, 03:44
Re: help pickus not saving - by Mencent - 21.01.2018, 08:53
Re: help pickus not saving - by BulletRaja - 21.01.2018, 11:15
Re: help pickus not saving - by BulletRaja - 26.01.2018, 04:59
Re: help pickus not saving - by jlalt - 26.01.2018, 07:03
Re: help pickus not saving - by BulletRaja - 26.01.2018, 07:54
Re: help pickus not saving - by jlalt - 26.01.2018, 08:01
Re: help pickus not saving - by BulletRaja - 26.01.2018, 08:46

Forum Jump:


Users browsing this thread: 3 Guest(s)