AutoNitro no save !
#1

look on this code:

pawn Код:
if(!strcmp(cmd,"/BuyAutoNitro",true))
    {
        if(dini_Int(pFile(playerid),"HaveCar") == 0 && IsPlayerXAdmin(playerid))return SendClientMessage(playerid,red,".айп шлб ббтмеък");
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"! аъд ма роца бшлб");
        if(vehicleid != CarID(playerid) && IsPlayerXAdmin(playerid)) return SendClientMessage(playerid,red,"! жд ма дшлб щмк");
        if(dini_Isset(RegvFile(GetPlayerVehicleID(playerid)),"AutoNitro")) return SendClientMessage(playerid,red,"! мшлб жд йщ лбш рйише");
        new carmodel = GetVehicleModel(vehicleid); for(new v=0; v < sizeof(VehicleCantBuyNeon); v++)
        if(carmodel == VehicleCantBuyNeon[v][0]) return SendClientMessage(playerid,red,"! аъд ма йлем мчреъ мшлб цйбешй рйише");
        if(dini_Int(vFile(vehicleid),"sCar") == 0 && IsPlayerXAdmin(playerid)) return SendClientMessage(playerid,red,"! фчегд же жойрд мшлбйн ойезгйн бмбг");
        if(GetPlayerMoney(playerid) < 1500000 && IsPlayerXAdmin(playerid)) return SendClientMessage(playerid,red,"! айп мк осфйч лсу");
        if(IsPlayerXAdmin(playerid)){GivePlayerMoney(playerid,-1500000);}
        dini_IntSet(RegvFile(vehicleid),"AutoNitro",1);
        AutoNOS[playerid] = true;
        return SendClientMessage(playerid,yellow,"! чрйъ мшлбк рйише");
    }
   
    if(!strcmp(cmdtext,"/SellAutoNitro",true))
    {
        if(dini_Int(pFile(playerid),"HaveCar") == 0 && IsPlayerXAdmin(playerid))return SendClientMessage(playerid,red,".айп шлб ббтмеък");
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"! аъд ма роца бшлб");
        if(vehicleid != CarID(playerid) && IsPlayerXAdmin(playerid)) return SendClientMessage(playerid,red,"! жд ма дшлб щмк");
        if(!dini_Isset(RegvFile(GetPlayerVehicleID(playerid)),"AutoNitro")) return SendClientMessage(playerid,red,"! мшлб жд айп рйише");
        if(dini_Int(vFile(vehicleid),"sCar") == 0 && IsPlayerXAdmin(playerid)) return SendClientMessage(playerid,red,"! фчегд же жойрд мшлбйн ойезгйн бмбг");
        dini_Unset(RegvFile(GetPlayerVehicleID(playerid)),"AutoNitro");
        if(IsPlayerXAdmin(playerid)) {GivePlayerMoney(playerid,550000);}
        SetVehicleToRespawn(vehicleid);
        AutoNOS[playerid] = false;
        PlayerPlaySound(playerid,1055,0.0,0.0,0.0);
        return SendClientMessage(playerid,green,"! олшъ аъ дрйише");
    }
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && AutoNOS[playerid] && (newkeys & KEY_ACTION || newkeys & KEY_FIRE)) AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
return 1;}
what the problem why is no saved ? After "GMX" that save but after server closed he not save .. why ?
Reply
#2

You'll need to save it into a database like MySQL or some .txt file.
Reply
#3

Quote:
Originally Posted by tsonn1
Посмотреть сообщение
You'll need to save it into a database like MySQL or some .txt file.
I do not understand what you mean can you be more evident?
Reply
#4

You'll need a MySQL plugin for ur server and you'll also need a MySQL database if u wanna make it to MySQL.

Otherwise u have to make a file with notepad (Blank .txt file) and put it into ur scriptfiles folder.
And into script something like this:
pawn Код:
n2ostuff = LoadFromFile("txtfile");
Reply
#5

Quote:
Originally Posted by tsonn1
Посмотреть сообщение
You'll need a MySQL plugin for ur server and you'll also need a MySQL database if u wanna make it to MySQL.

Otherwise u have to make a file with notepad (Blank .txt file) and put it into ur scriptfiles folder.
And into script something like this:
pawn Код:
n2ostuff = LoadFromFile("txtfile");
I still do not understand .. There is no more simple way ?
If you can help me a private message I thank you match !
Reply
#6

I'll start helping u through PM tomorrow.

I'm kind of busy right now. Accidentally cut my hand.
Reply
#7

Quote:
Originally Posted by tsonn1
Посмотреть сообщение
I'll start helping u through PM tomorrow.

I'm kind of busy right now. Accidentally cut my hand.
Lol xD ok ty man ..
Meanwhile someone else?
Reply
#8

Someone
Reply
#9

Help me
Reply
#10

How are you're accounts saved?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)