NEED BIG HELP! - 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)
+--- Thread: NEED BIG HELP! (
/showthread.php?tid=529692)
NEED BIG HELP! -
Ciarannn - 03.08.2014
Okay so my server when I made it was working fine.. but all of a sudden, some of the chats I made like, /announce, /b, /ooc and stuff are all limited to like 50 characters and I didnt do anything! Is this a common problem, and if so how might I fix it?
NOTE: If lines of code are needed just comment and I'll put them up. :P
The /b command..
Код:
command(b, playerid, params[])
{
new Message[128], string[128];
if(sscanf(params, "z", Message))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /b [message]");
}
else
{
if(strlen(Message) < 1 || !IsPlayerConnectedEx(playerid))
{
return 1;
}
else
{
if(Player[playerid][PrisonID] == 1)
{
SendClientMessage(playerid, WHITE, "You may not use this channel right now.");
}
else
{
format(string, sizeof(string), "(( %s says: %s )) ", GetName(playerid), Message);
NearByMessage(playerid, WHITE, string);
}
}
}
return 1;
}
Re: NEED BIG HELP! -
Steel_ - 03.08.2014
This is not a problem its just made by the SA:MP team like that like my server has a /me command and its only 50 charachters this happens on every server
Re: NEED BIG HELP! -
Stinged - 03.08.2014
Wizdo, what you're saying is wrong.
Ciarannn, what command processor are you using? And are you using sscanf?
Also, please post one command, /ooc or /b etc..
Re: NEED BIG HELP! -
Ciarannn - 03.08.2014
Nah, thats not the problem.. its alot shorter than usual if you know what I mean.. like before I could do this: "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH" but now I can only do this: "HHHHHHHHHHHH".. whats going on?
Re: NEED BIG HELP! -
Ciarannn - 03.08.2014
Quote:
Originally Posted by Stinged
Wizdo, what you're saying is wrong.
Ciarannn, what command processor are you using? And are you using sscanf?
Also, please post one command, /ooc or /b etc..
|
Added command in the main text.
Re: NEED BIG HELP! -
Stinged - 03.08.2014
zcmd has params in it.
You SHOULD NOT use sscanf if you're only using a string.
pawn Код:
command(b, playerid, params[])
{
new string[129];
if(isnull(params)) // zcmd has parmas and isnull, use them if you're only going to use a string.
{
SendClientMessage(playerid, WHITE, "SYNTAX: /b [message]");
}
else
{
if(!IsPlayerConnectedEx(playerid))
{
return 1;
}
else
{
if(Player[playerid][PrisonID] == 1)
{
SendClientMessage(playerid, WHITE, "You may not use this channel right now.");
}
else
{
format(string, sizeof(string), "(( %s says: %s )) ", GetName(playerid), params);
NearByMessage(playerid, WHITE, string);
}
}
}
return 1;
}
Re: NEED BIG HELP! -
Ciarannn - 03.08.2014
Quote:
Originally Posted by Stinged
zcmd has params in it.
You SHOULD NOT use sscanf if you're only using a string.
pawn Код:
command(b, playerid, params[]) { new string[129]; if(isnull(params)) // zcmd has parmas and isnull, use them if you're only going to use a string. { SendClientMessage(playerid, WHITE, "SYNTAX: /b [message]"); } else { if(!IsPlayerConnectedEx(playerid)) { return 1; } else { if(Player[playerid][PrisonID] == 1) { SendClientMessage(playerid, WHITE, "You may not use this channel right now."); } else { format(string, sizeof(string), "(( %s says: %s )) ", GetName(playerid), params); NearByMessage(playerid, WHITE, string); } } } return 1; }
|
Thank you so much man, your a life saver. I thought that was the end of my script.. because you couldn't go on like that.
ONE REP FOR YOU!