help pickus not saving
#7

in ur create command, make the file before writing into it.

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);
    new 
str[128];
    
format(strsizeof(str), "p%d"id);
    
dini_Create(str);
    
SavePics();
    return 
1;

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)