SA-MP Forums Archive
hello again... Again one problem... - 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: hello again... Again one problem... (/showthread.php?tid=251292)



hello again... Again one problem... - trapped1 - 26.04.2011

So I use zcmd but now i'm thinking how to get it write becouse I'm new at zcmd so yeah...

SO I want when pleyer says text like

/think he is retarded

the text out put was:

Player name thinks he is retarded

Код:
CMD:think(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, 0x8000FFC9, "/think [text]");
    new
        string[128],
        pName[20 char]
    ;
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), "* thinks %s %s *", pName, params);
    return SendClientMessageToAll(0x8000FFC9, string);
}



Re: hello again... Again one problem... - Raimis_R - 26.04.2011

pawn Код:
CMD:think(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, 0x8000FFC9, "/think [text]");
    new
        string[128],
        pName[MAX_PLAYER_NAME]
    ;
    GetPlayerName(playerid, pName,MAX_PLAYER_NAME);
    format(string, sizeof(string), "* thinks %s %s *", pName, params);
    SendClientMessageToAll(0x8000FFC9, string);
    return true;
}



Re: hello again... Again one problem... - trapped1 - 26.04.2011

You see the out put text is

thinks Player name and Surname...

but I need

Player name and Surname thinks he is shit head ....


Re: hello again... Again one problem... - Raimis_R - 26.04.2011

pawn Код:
CMD:think(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, 0x8000FFC9, "/think [text]");
    new
        string[128],
        pName[MAX_PLAYER_NAME]
    ;
    GetPlayerName(playerid, pName,MAX_PLAYER_NAME);
    format(string, sizeof(string), "* %s thinks: %s *", pName, params);
    SendClientMessageToAll(0x8000FFC9, string);
    return true;
}



Re: hello again... Again one problem... - trapped1 - 26.04.2011

Thank you mate :P Have a great day