How to save
#1

Anyone knows how to save it? Searched it but didn't find anything.

pawn Код:
CMD:setm4skill(playerid, params[])
{
    new string[128], giveplayerid, skill;
    if(sscanf(params, "ud", giveplayerid, skill))
    {
        SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /setm4skill [playerid] [skill level]");
        return 1;
    }
    if (PlayerInfo[playerid][pAdmin] >= 1338) {
        if(IsPlayerConnected(giveplayerid)) {
            if(giveplayerid != INVALID_PLAYER_ID)
            {
                SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_M4, skill);
                format(string, sizeof(string), "You have set %s's M4 skill to %d.", GetPlayerNameEx(giveplayerid), skill);
                SendClientMessageEx(playerid, COLOR_WHITE, string);
            }
        }
        else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified.");
    }
    else {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
    }
    return 1;
}
Reply
#2

You haven't searched, have you. You can use dini, mysql, y_ini and a lot more.
Reply
#3

Quote:
Originally Posted by Luis-
Посмотреть сообщение
You haven't searched, have you. You can use dini, mysql, y_ini and a lot more.
Maybe you should start reading the posts above you before you say anything. I specified that I did search and didn't find anything.
Reply
#4

I'm not looking for y_ni include, I already have it. I just don't know how to use with SetPlayerSkillLevel
Reply
#5

And that's what searching is for. Perhaps run a query like "how to use y_ini samp" in ******- you'll find something; most likely, the tutorial ****** made for people who don't know how to use y_ini. SetPlayerSkillLevel() is just like saving someone's health- all you need to know is a value.

Quit being an ignorant little cunt and try doing something on your own for once.
Reply
#6

Quote:
Originally Posted by damian123
Посмотреть сообщение
I'm not looking for y_ni include, I already have it. I just don't know how to use with SetPlayerSkillLevel
That's because you don't have a basic understanding of programming. In this context, searching is more than just typing in a few keywords and expecting the answer to flash up on the screen. Read the official y_ini thread and examine the functions it provides and their parameters. Further, the thread links to a basic tutorial on how to use y_ini, and searching ****** for "y_ini tutorial" returns a lot of useful results.

I may come across as harsh but it is because you need to learn these principles if you're going to become an able programmer. These types of threads appear very often, and it is frustrating when users such as yourself expect others to spend their time writing out code or searching when it only takes a little bit of effort to make use of resources that already exist.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)