[POMOC]Chat..sad po pravilima :)

Započeo TrakkaMadafakaâ„¢, Avgust 16, 2012, 21:26:48 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:SDRPG
Detaljan opis problema:Evo sad je valjda po pravilima ...Ovako .. imam jedan RP Mod i htio bi ga pretvorit u RPG/DM i sad neznam kako da "/b" chat , "/c[lose]", "/local" I "/say" chat , da izmjenim u jednostavni (samo pritisnes tipku [T] ii napises zeljeni text i da pise OnoO " %s kaze: %s " )
Sad evo ovaj dio skripte sa tim komandam (/b ,/c, /close,/say) ...pa bi zamolio  nekog dobre volje da mi objasni sta bi ovde trebao izbrisat/dodat/napisat ...

Unaprijed se zahvaljujem onome ko mi pomogne / pokusa pomoći ...
Dio skripte:

//----------------------------------[Local]-----------------------------------------------
if(strcmp(cmd, "/local", true) == 0 || strcmp(cmd, "/say", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Niste se prijavili!");
            return 1;
        }
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /local [local chat]");
return 1;
}
            new brojevi[] = { '1','2','3','4','5','6','7','8','9'};
for(new b = 0; b < sizeof brojevi; b++)
{
new tekst = strlen(result);
for(new i = 0; i<tekst; i++)
{
if(result[i] == brojevi[b])
result[i] = '*' ;
}
}
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Stranac kaze: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
    {
    format(string, sizeof(string), "%s kaze: %s", sendername, result);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
else
{
    new carid = GetPlayerVehicleID(playerid);
    if(IsABike(carid) || IsAOBike(carid) || IsAPizzabike(carid) || IsAPlane(carid) || IsABoat(carid) || IsAHarvest(carid) || pveh == 523 || pveh == 480 || pveh == 567 || pveh == 533 || pveh == 555 || pveh == 539 || pveh == 572 || pveh == 571 || pveh == 530 || pveh == 457 || pveh == 575 || pveh == 536 || pveh == 424)
    {
        if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Stranac kaze: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
    {
    format(string, sizeof(string), "%s kaze: %s", sendername, result);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
    }
    else
    {
    if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
    {
    if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "(Zatvoren prozor) Stranac kaze: %s", result);
ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
    format(string, sizeof(string), "(Zatvoren prozor) %s kaze: %s", sendername, result);
    ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
else
{
    if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "(Otvoren prozor) Stranac kaze: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
    format(string, sizeof(string), "(Otvoren prozor) %s kaze: %s", sendername, result);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
}
}
printf("%s", string);
}
return 1;
}
if(strcmp(cmd, "/b", true) == 0)//local ooc
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Niste se prijavili !");
            return 1;
        }
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /b [lokalni ooc chat]");
return 1;
}
            new brojevi[] = { '1','2','3','4','5','6','7','8','9'};
for(new b = 0; b < sizeof brojevi; b++)
{
new tekst = strlen(result);
for(new i = 0; i<tekst; i++)
{
if(result[i] == brojevi[b])
result[i] = '*' ;
}
}
if(PlayerInfo[playerid][pMaskuse] == 1)
{
    format(string, sizeof(string), "((Stranac kaze:  %s ))", result);
}
else
{
format(string, sizeof(string), "((%s kaze: %s ))", sendername, result);
}
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);
}
return 1;
}
if(strcmp(cmd, "/close", true) == 0 || strcmp(cmd, "/c", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Niste se prijavili !");
            return 1;
        }
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /(c)lose [close chat text]");
return 1;
}
            new brojevi[] = { '1','2','3','4','5','6','7','8','9'};
for(new b = 0; b < sizeof brojevi; b++)
{
new tekst = strlen(result);
for(new i = 0; i<tekst; i++)
{
if(result[i] == brojevi[b])
result[i] = '*' ;
}
}
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Stranac kaze: %s", result);
}
else
{
    format(string, sizeof(string), "%s kaze: %s", sendername, result);
}
ProxDetector(3.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): ///

Pobrisi sve ove komande i ostat ce Sa [T] jer je to default u SAMP :D

Data64.dll | HTML & CSS | DEVELOPER





Vegas.

Pa ako misliš da samo bude IC chat, a serveru RPG/DM, izbriši samo /b.