SA-MP Forums Archive
Help with some things - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with some things (/showthread.php?tid=239689)



Help with some things - Rivera - 14.03.2011

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!


Re: Help with some things - XFlawless - 14.03.2011

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.


Re: Help with some things - Rivera - 14.03.2011

oh yeah! thanks... how about the user file?!


Re: Help with some things - HyperZ - 14.03.2011

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;
}



Re: Help with some things - Rivera - 14.03.2011

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

there, I have taken a SS:



Re: Help with some things - HyperZ - 14.03.2011

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;
}



Re: Help with some things - Rivera - 14.03.2011

already tried... isn't working :P


Re: Help with some things - HyperZ - 14.03.2011

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;
}



Re: Help with some things - Rivera - 14.03.2011

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


Re: Help with some things - HyperZ - 14.03.2011

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