[Addon] Id system
#1

a short explain
this is a id system
like Name :[id] text
Radi :[0] i luv sa-mp
you can change the [ ] around the id

http://radi.pastebin.com/m4be86576
Reply
#2

work this on GF too?

and if someone write /o Text the [ID] Name ?
Reply
#3

if you send me the command from /o i can make it
its easy but you need to know it
you can add it on everything

Reply
#4

here

Quote:

//----------------------------------[ooc]-----------------------------------------------
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
return 1;
}
if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " The OOC channel has been disabled by an Admin !");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]");
return 1;
}
format(string, sizeof(string), "[OOC] %s: %s " , sendername, result);
OOCOff(COLOR_OOC,string);
printf("%s", string);
}
return 1;
}
if(strcmp(cmd, "/noooc", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 2 && (!noooc))
{
noooc = 1;
BroadCast(COLOR_GRAD2, " OOC chat channel disabled by an Admin !");
}
else if (PlayerInfo[playerid][pAdmin] >= 2 && (noooc))
{
noooc = 0;
BroadCast(COLOR_GRAD2, " OOC chat channel enabled by an Admin !");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}

Thank you
Reply
#5

pawn Код:
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
    {
        if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
        {
            SendClientMessage(playerid, COLOR_GRAD2, "  the ooc chanel has been disabled by admin");
            return 1;
        }
        if(Mute[playerid] == 1)
        {
            SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
            return 0;
        }
        GetPlayerName(playerid, sendername, sizeof(sendername));
        new length = strlen(cmdtext);
        while ((idx < length) && (cmdtext[idx] <= ' '))
        {
            idx++;
        }
        new offset = idx;
        new result[64];
        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
        {
            result[idx - offset] = cmdtext[idx];
            idx++;
        }
        result[idx - offset] = EOS;
        if(!strlen(result))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]");
            return 1;
        }
        format(string, sizeof(string), "[OOC] %s:[%d] %s " , sendername, playerid, result);
        OOCOff(TEAM_ORANGE_COLOR,string);
        printf("%s", string);
        return 1;
    }
you only have to add [%d] in the line and , playerid on the right place afther the " and before the );
Reply
#6

thx
Reply
#7

np
Reply
#8

Heey tim,

thx man ik wou dit allang, dus ik vroeg vandaag heb jij dat want ik zag het in je server :P
maar je hebt het op forum.samp gezet thx
Reply
#9

Already have one
tanks anyway
Reply
#10

its a good script tho its pretty simple^^
wont use it tho
:P
would call it snippet tho
it's not an "addon"^^

Quote:
Originally Posted by Steef v Trigt
Heey tim,

thx man ik wou dit allang, dus ik vroeg vandaag heb jij dat want ik zag het in je server :P
maar je hebt het op forum.samp gezet thx
pease speak english man
tho i understand what u say because i live near the dutch boarder
but this aint a dutch or whatever forum
its english.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)