GivePlayerXP ???
#1

I wanna make a thing like GivePlayerCash so what do i use i wanna make GivePlayerXP SetPlayerXP GivePlayerRank with saving also so please can someone give me ideas ?
Reply
#2

Xp you meaning Score?
Reply
#3

If you've included 'ZCMD' and also 'sscanf2'

Add this at the bottom of the script
pawn Код:
#include "zcmd"
#include "sscanf2"

Below OnPlayerCommandText
pawn Код:
COMMAND:xp(playerid, params[])
{
    if(PlayerAcc[playerid][AdminLevel] >= 4) // change this to the ranks of your admin.
    {
        new target;
        new amount;
        if(sscanf(params, "ud", target, amount)
        {
            new str[128];
            format(str, sizeof(str), "Your XP has been set to %d .", amount);
            SendClientMessage(playerid, 0xFFFFFFF, str);
            PlayerAcc[playerid][xp] == amount; //change to the way your system works
        }
        else SendClientMessage(playerid, -1, "USAGE: /xp [playerid/partofname] [amount of xp]");
    }
    else SendClientMessage(playerid, -1, "This command does not exist in our database.");
    return 1;
}
I didn't quite know what you're asking for, but here you go.
Reply
#4

I mean a new xp fuction that save means if a player has 500 Xp he will get some weapon
etc etc
Reply
#5

Well the function to give XP is
Код:
IncreasePlayerXP(playerid,amount);
Reply
#6

Yes something like that but what do i use Stock
Reply
#7

Just use the score. The scores are something like XPs. Function to check what the player score is is GetPlayerScore. Function for setting a player's score is SetPlayerScore. As I said, Score is nothing else than XP. If you really want your own XP system so badly, use ysi/yini.
Quote:
pawn Код:
PlayerAcc[playerid][xp] == amount; //change to the way your system works
I don't think he has his own system. If then he wouldn't be asking.
Reply
#8

I want a function like SetPlayerScore etc
Reply
#9

Quote:
Originally Posted by rockhopper
Посмотреть сообщение
Yes something like that but what do i use Stock
Yea,you should create stock before using this.
Reply
#10

Quote:
Originally Posted by ZachKnoxx
Посмотреть сообщение
If you've included 'ZCMD' and also 'sscanf2'

..

[/pawn]
Yep, just post random code without caring if those variables and enums even exist in his script or not! And ZCMD commands are separate functions.

Quote:
Originally Posted by Sojo12
Посмотреть сообщение
Well the function to give XP is
Код:
IncreasePlayerXP(playerid,amount);
:/

Quote:
Originally Posted by rockhopper
Посмотреть сообщение
Yes something like that but what do i use Stock
All stocks are functions, but not ALL functions are stocks - if ****** read this, he'd go ballistic or something, as he has on the recent posts regarding the same topic.

Lastly, you can download this and check for HOW it runs, is coded and you could try replicating it on your own. It's really easy.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)