Respect System! (+REP)
#1

Is it Possible do Make Respect System
With /giverespect do other player
and if he loses his points or i want i can set them in scriptfolder

Can enyone help me?
Reply
#2

need it too good luck
Reply
#3

If you have ever saved RP stats, then you just do the same thing?
Reply
#4

Here's a very simple example using ZCMD and sscanf. You can expand it to your needs if you like.

pawn Код:
new Respect[MAX_PLAYERS];

CMD:giverespect(playerid, params[])
{
    new id, resp;
    if(sscanf(params, "ui", id, resp)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /giverespect [Player ID] [Respect]");
    Respect[id] += resp;
    new str[128];
    new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name));
    new pName[MAX_PLAYER_NAME]; GetPlayerName(id, pName, sizeof(pName));
    format(str, sizeof(str), "Administrator %s gave you %i respect!", name, resp);
    SendClientMessage(id, 0x00FF00FF, str);
    format(str, sizeof(str), "You gave %s %i respect!", pName, resp);
    return 1;
}

CMD:respect(playerid, paraps[])
{
    new str[128];
    format(str, sizeof(str), "You have {FFFFFF}%i {00FF00}respect points!");
    SendClientMessage(playerid, 0x00FF00FF, str);
    return 1;
}
Reply
#5

when you do /giverespect it giving this message

Administrator My_Name gave you 0 respect

i did /giverespect My ID 100
Reply
#6

Modify it. Check every line of the script untill you understand it. Ain't hard to see that there is more than just ID.
Reply
#7

Yes, it is possible. It can be done.
Reply
#8

In

CMD:respect (playerid, paraps)...

Isn't it supposed to be (playerid, params) ?


Anyway, you could always look for some respect filterscript on the forum, or make one such as the one kindly posted by SpiritEvil.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)