[Pomoc] Event vozila i Anti-Advertise

Započeo [M:RP] Williamsâ„¢, Jul 22, 2011, 14:29:12 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Anti-advertise
Detaljan opis problema: 1. Kako da namestim da mi Anti-Advertise radi i u ooc i potrena mi je skripta za pravljenje/unistavanje event vozila.
Dio skripte: Anti-AD: new brojevi[] = { '1','2','3','4','5','6','7','8','9'};
for(new b = 0; b < sizeof brojevi; b++)
{
new tekst = strlen(text);
for(new i = 0; i<tekst; i++)
{
if(text[i] == brojevi[b])
text[i] = '*' ;
}
}

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


Trenutno radim na modu Monaco RolePlay od 0.
Uradjeno: 95% | COMING SOON!


/o sam izbrisao to mi ne treba... evo /b

if(strcmp(cmd, "/b", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "** You havent logged in yet !");
            return 1;
        }
        if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 1;
}

new y,m,d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
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, "USAGE: /b [local ooc chat]");
return 1;
}
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
format(string, sizeof(string), "(( Admin : %s ))", result);
SetPlayerChatBubble(playerid, string, COLOR_NICERED, 20.0, 8000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Local OOC -Admin-): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "(( Stranac : %s ))", result);
SetPlayerChatBubble(playerid, string, COLOR_WHITE, 20.0, 8000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Local OOC -Masked-): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 0)
{
    format(string, sizeof(string), "(( %s : %s ))", sendername, result);
    SetPlayerChatBubble(playerid, string, COLOR_WHITE, 20.0, 8000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Local OOC): %s",d,m,y,h,mi,s, sendername, result);
    ChatLog(string);
   }
}
return 1;
}


Trenutno radim na modu Monaco RolePlay od 0.
Uradjeno: 95% | COMING SOON!

Eto ti a sad cu ti nac nesto za event

if(strcmp(cmd, "/b", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "** You havent logged in yet !");
            return 1;
        }
        if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 1;
}

new y,m,d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
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, "USAGE: /b [local 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][pAdminDuty] == 1)
{
format(string, sizeof(string), "(( Admin : %s ))", result);
SetPlayerChatBubble(playerid, string, COLOR_NICERED, 20.0, 8000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Local OOC -Admin-): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "(( Stranac : %s ))", result);
SetPlayerChatBubble(playerid, string, COLOR_WHITE, 20.0, 8000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Local OOC -Masked-): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 0)
{
    format(string, sizeof(string), "(( %s : %s ))", sendername, result);
    SetPlayerChatBubble(playerid, string, COLOR_WHITE, 20.0, 8000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Local OOC): %s",d,m,y,h,mi,s, sendername, result);
    ChatLog(string);
   }
}
return 1;
}



         if(strcmp(cmd, "/evozila", true) == 0)
{
         if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
   {
           ShowPlayerDialog(playerid,59,DIALOG_STYLE_LIST,"Tourww Event","Stvori Aute\nUnisti Aute","Odaberi", "Zatvori");
   }
   else
   {
  SendClientMessage(playerid,COLOR_GRAD1,"[ERROR]: Samo admin lvl 1 moze koristiti ovu komandu!");
   }
        return 1;
    }


i pod ondialogresponse

  if(dialogid == 59)
    {

        switch(listitem)
        {

            case 0:
            {

Event1 = CreateVehicle(411,2854.8875,-1917.1416,10.6641,0.6626,1,1,60000); // tww car 1


                SendClientMessage(playerid,COLOR_YELLOW,"[EVENT]: Vozila za utrku su uspjesno stvorena.");
            }
            case 1:
            {
                  DestroyVehicle(Event1);
       
                  SendClientMessage(playerid,COLOR_YELLOW,"[EVENT]: Vozila za event su unistena.");
            }

}
}


i naravno logicki gore u skripti stavit new Event1;

to je npr za jedan event..i onda dodajes dalje vozila event2 itd..
Poslednja Izmena: Jul 22, 2011, 17:59:27 POSLE PODNE od Narco_VK
Vratio sam se ponovo ocekjute novi server...

ovo za /b ne radi, a ja za event zelim da ne mora za svaki tka oda bude vec kad ukucam da bude lepo.. a ne listu evenata pa blablabla... samo da spawnujem 10 vozila istog id-a i da gih mogu unistiti


Trenutno radim na modu Monaco RolePlay od 0.
Uradjeno: 95% | COMING SOON!

  if(dialogid == 59)
    {

        switch(listitem)
        {

            case 0:
            {

Event1 = CreateVehicle(411,2854.8875,-1917.1416,10.6641,0.6626,1,1,60000); // tww car 1
Event2 = CreateVehicle(411,TU DRIGE KOORDINATE,1,1,60000); // tww car2 // ovo je primer kako da dodas drugo auto


                SendClientMessage(playerid,COLOR_YELLOW,"[EVENT]: Vozila za utrku su uspjesno stvorena.");
            }
            case 1:
            {
                  DestroyVehicle(Event1);
                  DestroyVehicle(Event2); // ovo je primer kako da ti unisti i to drugo auto
       
                  SendClientMessage(playerid,COLOR_YELLOW,"[EVENT]: Vozila za event su unistena.");
            }

}
}
//