#1

how can i make a /pm command and /ann command?
Reply
#2

try googling it. There are many script's out there
Reply
#3

Check the "base" FS in the SA:MP package. It has a /pm command
Reply
#4

pawn Код:
dcmd_ann(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOUR_ADMIN, "Authority Level Required");
    if(!strlen(params)) return SendClientMessage(playerid, COLOUR_ADMIN, "Usage: /ann [message]");
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GameTextForPlayer(i, params, 10000, 5);
        }
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by funky1234
Посмотреть сообщение
pawn Код:
dcmd_ann(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOUR_ADMIN, "Authority Level Required");
    if(!strlen(params)) return SendClientMessage(playerid, COLOUR_ADMIN, "Usage: /ann [message]");
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GameTextForPlayer(i, params, 10000, 5);
        }
    }
    return 1;
}
thx but i forgot to say... i want this code in strtok
Reply
#6

Quote:
Originally Posted by omer5198
Посмотреть сообщение
thx but i forgot to say... i want this code in strtok
Why, using strtok in here is useless, just use normal things here, you use strtok for like 2 parameters, like [ID] [Something]... For like just text (1 parameter) you just need deufault SA-MP functions.
Reply
#7

Quote:
Originally Posted by funky1234
Посмотреть сообщение
pawn Код:
dcmd_ann(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOUR_ADMIN, "Authority Level Required");
    if(!strlen(params)) return SendClientMessage(playerid, COLOUR_ADMIN, "Usage: /ann [message]");
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GameTextForPlayer(i, params, 10000, 5);
        }
    }
    return 1;
}
i need strtok code
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)