How to create /ado like this? - 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: How to create /ado like this? (
/showthread.php?tid=531242)
Deleted :) -
kloning1 - 11.08.2014
Deleted

Fixed
thank's for all
Re : new line text help :( -
DarkZeroX - 11.08.2014
PHP код:
new
sSearch[] = "(e)", // String you want to search for
sReplace[] = "\n", // String you want to replace it with
format(sSubject,128,"%s",msg");
Re: How to create /ado like this? -
Stinged - 11.08.2014
https://sampwiki.blast.hk/wiki/Strlib
tr-replace
Download Strlib and use that.
pawn Код:
CMD:ado(playerid, params[])
{
// Whatever
str_replace("(e)", "\n", params);
// Whatever
return 1;
}
Re: Re : new line text help :( -
kloning1 - 11.08.2014
Quote:
Originally Posted by DarkZeroX
format(string,sizeof(string),"%s\n((%s))",msg,pnam e);
|
i know this, but not like this, it can only make 1 line only for description
whereas I need a 2 line or more to the description,
#look pic

thanks for the answer
Re: How to create /ado like this? -
kloning1 - 11.08.2014
can you help me? to send the include?
I want to download it
but the web can not be accessed,
Re : How to create /ado like this? -
DarkZeroX - 11.08.2014
https://sampwiki.blast.hk/wiki/Strlib/str_replace
Re: How to create /ado like this? -
kloning1 - 11.08.2014

waw
Re: How to create /ado like this? -
Stinged - 11.08.2014
Why aren't you using the function I gave you..
The one you're using doesn't work.
Should work.
pawn Код:
CMD:ado(playerid, params[])
{
if(ado[playerid] == 0)
{
ado[playerid] = 1;
new string[128],msg[128],pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
if(isnull(params)) return SendClientMessage(playerid,COLOR_WHITE, "USAGE: /ado <text>"); // Better for one string, use this instead of zcmd (if only one string)
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
format(string,sizeof(string),"%s \n((%s))",str_replace("(e)", "\n", params), pname);
SendClientMessage(playerid,COLOR_WHITE,"You have placed /ado, {FF0033}/ado {FFFFFF}again to remove it.");
ado3dtext[playerid] = CreateDynamic3DTextLabel(string,COLOR_PURPLE,x,y,z-0.25,INVALID_PLAYER_ID,INVALID_VEHICLE_ID);
return 1;
}
return 1;
}