Hello I have a fue questions..
#1

1. How to save score in y_ini?
2. How to save x y z positions in y_ini?
3. How to make admin system with gTeam and gang ranks and how to make cmds?
4. Or better is use y_classes and y_groups?

(If you have some free time pls just need a little example..)

I'm learning scripting but I don't want to use something like god father to learn about that..

Because with reading only I can't learn.. I need to see script (only basic) to understood it and get some point.

That's all thank you for your time.. If you think this is useless then sorry for your spent time to read this..
Reply
#2

Hi again scrillex, send me your .pwn once again I'll do it for you well the 2 first questions.
Reply
#3

Thanks I sent to you I just want to see how thing are working.. Like saving ++ score.. If I'm right ++ means unlimited..
Reply
#4

What do you mean by ''score'' ? Player Score ?
Reply
#5

Like yes player score.. But the thing is I need to set timer on giving player + 1 score every hour.. it's not fully done but I just want to see like how it all works.
Reply
#6

Well I'll do the saving x,y,z position on disconnecting cuz i dont rly have time for the score
Reply
#7

Okay
Reply
#8

For none reason it has an error.. I'll take a look at it tomorow if it's still not solved I really have to go.
Reply
#9

Okay thanks mate It will be grate it's sad I cant give you another +1 rep
Reply
#10

How to save positions using y_ini


Now, about teams. If you are making a RP gamemode. Then you would use an enum.
pawn Код:
enum Info
{
    pFaction,
    pRank
}
new PlayerInfo[MAX_PLAYERS][Info];
Let's make a simple command that invites a player to the team.
pawn Код:
enum Info
{
    pFaction,
    pRank
}
new PlayerInfo[playerid][Info]

/*
This is using ZCMD and sscanf2
switch to it if you haven't already
*/

CMD:invite(playerid,params[])
{
    new targetid, // A new variable that will who will join the team.

    // This is an admin only command.
    if(!IsPlayerAdmin(playerid)) // The ! is if he isn't.
    {
        // If he isn't admin, then it sends the message below.
        return SendClientMessage(playerid,-1,"You are not authorised to use this command.");
    }
    if(sscanf(params,"u",targetid)) // If they typed the command wrong, then sends this message
    {
        return SendClientMessage(playerid,-1,"USAGE: /invite [playerid]");
    }
    else // If they typed the command correctly
    {
        new name1[24],name2[24],string[124];
        GetPlayerName(playerid,name1,24);
        GetPlayerName(targetid,name2,24);
       
        format(string,sizeof(string),"%s has invited %s to their group.",name1,name2);
        SendClientMessageToAll(-1,string);
       
        PlayerInfo[targetid][pFaction] = 1; // Set's their faction to 1
        return 1;
    }
    return 1;
}
This is how you would make commands.
pawn Код:
CMD:mycommand(playerid,params[])
{
    if(PlayerInfo[playerid][pFaction] != 1) // If they are not in faction 1
    {
        // Then it sends the message.
        return SendClientMessage(playerid,-1,"You are not in this group.");
    }
    else // If they are in faction 1 then
    {
        // your code here
        return 1;
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)