How to create /ado like this?
#1

Deleted Fixed

thank's for all
Reply
#2

PHP код:
new
    
sSearch[] = "(e)",               // String you want to search for
    
sReplace[] = "\n",           // String you want to replace it with
    
format(sSubject,128,"%s",msg"); 
Reply
#3

https://sampwiki.blast.hk/wiki/Strlibtr-replace

Download Strlib and use that.

pawn Код:
CMD:ado(playerid, params[])
{
    // Whatever
    str_replace("(e)", "\n", params);
    // Whatever
    return 1;
}
Reply
#4

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
Reply
#5

can you help me? to send the include?

I want to download it
but the web can not be accessed,
Reply
#6

https://sampwiki.blast.hk/wiki/Strlib/str_replace
Reply
#7

waw
Reply
#8

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


Forum Jump:


Users browsing this thread: 4 Guest(s)