Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Pixel poslato Jun 27, 2011, 11:09:46 PRE PODNE

Naslov: [Pomoc] Erori
Poruka od: Pixel poslato Jun 27, 2011, 11:09:46 PRE PODNE
Skripta koju koristim: Tera Gaming Freeroam (mod od 0)
Detaljan opis problema: Pa stavljam Timove u GameMod i javljaju mi se neki erori
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno): (http://www.zaslike.com/files/ypv5ch2rqw21yae8n4cq.png)
Linija 2566: if(text[0] == '!')

Hvala unaprijed!
Naslov: Odg: [Pomoc] Erori
Poruka od: System32 poslato Jun 27, 2011, 11:16:35 PRE PODNE
daj cijeli kod od t linije pa dolje!
Naslov: Odg: [Pomoc] Erori
Poruka od: Pixel poslato Jun 27, 2011, 11:17:41 PRE PODNE
Eto..

if(text[0] == '!')
{
new name[24], string[256];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "[TIM]%s: %s", name, text[1]);
for(new c = 0; c < MAX_PLAYERS; c++)
{
if(IsPlayerConnected(c))
{
if(GetPlayerTeam(c) == GetPlayerTeam(playerid))
    SendClientMessage(c, GetPlayerColor(playerid), string);
    }
}
return 0;
}
Naslov: Odg: [Pomoc] Erori
Poruka od: Joey_ poslato Jun 27, 2011, 11:19:52 PRE PODNE
Daj još par linija iznad. Jer mislim da nešto iznad toga uzrokuje taj problem. :D
Naslov: Odg: [Pomoc] Erori
Poruka od: Pixel poslato Jun 27, 2011, 11:21:30 PRE PODNE
Eto sad bas sva ta komanda!

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mojtim", cmdtext, true, 10) == 0)
{
    if (pTeam[playerid] == team_dm)
    {
        SendClientMessage(playerid, 0xAA3333AA, "Vi ste Stunteri!");
    }
    else if (pTeam[playerid] == team_stunt)
    {
        SendClientMessage(playerid, 0xAA3333AA, "Vi ste DM-ovci");
    }
    return 1;
}
if(text[0] == '!')
{
new name[24], string[256];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "[TIM]%s: %s", name, text[1]);
for(new c = 0; c < MAX_PLAYERS; c++)
{
if(IsPlayerConnected(c))
{
if(GetPlayerTeam(c) == GetPlayerTeam(playerid))
    SendClientMessage(c, GetPlayerColor(playerid), string);
    }
}
return 0;
}
Naslov: Odg: [Pomoc] Erori
Poruka od: Joey_ poslato Jun 27, 2011, 11:25:31 PRE PODNE
Izbriši taj kod iz tog callbacka i stavi ga u OnPlayerText callback. Jer ovo što si ti napravio nema smisla.