Help with some things
#1

First of all. I have just set up my server (I just need a host and some changes) but I can't figure out the /me and /do cmds.

/me:
pawn Код:
dcmd_me(playerid, params[])
{
    new pName[24], str[128];
    GetPlayerName(playerid, pName, 24);
    if(sscanf(params, "us", pName, str)) return SendClientMessage(playerid, COLOR_RED, "/me <local IC chat>");
    format(str, sizeof(str), "%s", pName, str);
    SendClientMessageToAll(COLOR_PINK, str);
    return 0;
}
/do:
pawn Код:
dcmd_do(playerid, params[])
{
    new pName[24], str[128];
    GetPlayerName(playerid, pName, 24);
    if(sscanf(params, "us", pName, str)) return SendClientMessage(playerid, COLOR_RED, "/do <local IC chat>");
    format(str, sizeof(str), "%s ((%u))", str, pName);
    SendClientMessageToAll(COLOR_PINK, str);
    return 0;
}
When I get IG (with my name Don Rivera) it shows me like this. When I type /me lol it says: ERROR: /me <local IC chat>
When I type /me lol lol it shows:
yon_Rivera. (yes, not Don but yon.. )

and in my server_log:
[10:47:07] sscanf warning: Strings without a length are deprecated, please add a destination size.

Now, my other problem. When I create my account, where is it saved? And where is that folder/file located?!

please help me as soon as u can!
Reply
#2

pawn Код:
dcmd_me(playerid, params[])
{
    new pName[24], str[128], string[128];
    GetPlayerName(playerid, pName, 24);
    if(sscanf(params, "us[128]", pName, str)) return SendClientMessage(playerid, COLOR_RED, "/me <local IC chat>");
    format(string, sizeof(string), "%s", pName, str);
    SendClientMessageToAll(COLOR_PINK, string);
    return 0;
}
Try this.
Reply
#3

oh yeah! thanks... how about the user file?!
Reply
#4

pawn Код:
dcmd_me(playerid, params[])
{
    new pName[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_RED, "/me <local IC chat>");
    format(string, sizeof(string), "%s %s", pName, params);
    SendClientMessageToAll(COLOR_PINK, string);
    return 0;
}
Reply
#5

nopes... /me isn't working for me again :P

there, I have taken a SS:
Reply
#6

Quote:
Originally Posted by Rivera
Посмотреть сообщение
nopes... /me isn't working for me again :P

there, I have taken a SS:
Try this:
pawn Код:
dcmd_me(playerid, params[])
{
    new pName[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_RED, "/me <local IC chat>");
    format(string, sizeof(string), "%s %s", pName, params);
    SendClientMessageToAll(COLOR_PINK, string);
    return 0;
}
Reply
#7

already tried... isn't working :P
Reply
#8

Quote:
Originally Posted by Rivera
Посмотреть сообщение
already tried... isn't working :P
srry i was frgt something
try this it'll works.
pawn Код:
dcmd_me(playerid, params[])
{
    new pName[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_RED, "/me <local IC chat>");
    format(string, sizeof(string), "%s %s", pName, params);
    SendClientMessageToAll(COLOR_PINK, string);
    return 0;
}
Reply
#9

YES! It works. /do problem solved. Now, how about the users problem?!!
Reply
#10

Quote:
Originally Posted by Rivera
Посмотреть сообщение
YES! It works. /do problem solved. Now, how about the users problem?!!
Check in the "scriptfiles" folder.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)