[FilterScript] The LCS
#30

Quote:
Originally Posted by SumX
View Post
Mi-a sarit in ochi!

PHP Code:
public OnPlayerCommandText(playeridcmdtext[])
{
        if(
strcmp(cmd"/lcsannc"true) == 0)
        {
                if(
PlayerInfo[playerid][pAdmin] < 1)
                {
                        
SendClientMessage(playeridCOLOR_NICERED"Nu esti autorizat sa folosesti aceasta comanda!";
                        return 
1;
                }
                
SendClientMessageToAll(TEAM_VAGOS_COLOR"Eventul LCS a fost pornit! Scrie /joinlcs pentru a concura si tu!";
        }
        return 
1;

Vrei asa,cred:

PHP Code:
public OnPlayerCommandText(playeridcmdtext[])
{
        if(
strcmp(cmd"/lcsannc"true) == 0)
        {
                if(
PlayerInfo[playerid][pAdmin] >= 1)
                {
                        
SendClientMessageToAll(TEAM_VAGOS_COLOR"Eventul LCS a fost pornit! Scrie /joinlcs pentru a concura si tu!";
                }
                else
                {
                        
SendClientMessage(playeridCOLOR_NICERED"Nu esti autorizat sa folosesti aceasta comanda!";
                }
                return 
1;  
        }
        return 
1;

Mai sunt si la alte comenzi...corecteaza-le.
Daca tu nu scriptezi asa nu inseamna ca e gresit. Este corect deoarece in caz ca playerul nu are admin 1 va aparea mesajul ala dupa care va fi returnat , asta insemnand ca nu o sa mai apara ce este dupa acel IF. Scuze dar sunt praf la romana si s-ar putea ca 50% din ce am scris sa fie ca dracu..

HTML Code:
public OnPlayerCommandText(playerid, cmdtext[]) 
{ 
        if(strcmp(cmd, "/lcsannc", true) == 0) 
        { 
                if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_NICERED, "Nu esti autorizat sa folosesti aceasta comanda!");
                
                SendClientMessageToAll(TEAM_VAGOS_COLOR, "Eventul LCS a fost pornit! Scrie /joinlcs pentru a concura si tu!");
        }
        return 1; 
}
este una si aceeasi ca folosirea de if & else.. si inca ceva , mie mi-a sarit in ochi faptul ca el a folosit SendClientMessage astfel ..

HTML Code:
SendClientMessageToAll(TEAM_VAGOS_COLOR, "Eventul LCS a fost pornit! Scrie /joinlcs pentru a concura si tu!";
Nu stiu daca "Ti-a sarit in ochi" dar lipseste acea )..

Code:
SendClientMessageToAll(TEAM_VAGOS_COLOR, "Eventul LCS a fost pornit! Scrie /joinlcs pentru a concura si tu!");
Deci m-ai pe scurt tu i-ai zis ceva care nu avea rost in loc sa ii corectezi erorile de compilare ..
Reply


Messages In This Thread
The LCS - by DiGiTaL_AnGeL - 09.10.2012, 14:56
Re: The LCS - by Flashhiee - 09.10.2012, 16:17
Re: The LCS - by DiGiTaL_AnGeL - 09.10.2012, 16:36
Re: The LCS - by Flashhiee - 09.10.2012, 16:46
Re: The LCS - by DiGiTaL_AnGeL - 09.10.2012, 16:47
Re: The LCS - by SumX - 09.10.2012, 18:45
Re: The LCS - by DiGiTaL_AnGeL - 09.10.2012, 18:47
Re: The LCS - by Flashhiee - 09.10.2012, 18:57
Re: The LCS - by DiGiTaL_AnGeL - 09.10.2012, 19:08
Re: The LCS - by SumX - 09.10.2012, 19:56
Re: The LCS - by DiGiTaL_AnGeL - 09.10.2012, 19:59
Re: The LCS - by TzAkS. - 10.10.2012, 10:51
Re: The LCS - by DiGiTaL_AnGeL - 10.10.2012, 11:52
Re: The LCS - by DiGiTaL_AnGeL - 10.10.2012, 18:48
Re: The LCS - by Flashhiee - 10.10.2012, 19:13
Re: The LCS - by DiGiTaL_AnGeL - 10.10.2012, 19:14
Re: The LCS - by TzAkS. - 10.10.2012, 19:37
Re: The LCS - by DiGiTaL_AnGeL - 10.10.2012, 19:38
Re: The LCS - by ShikamaruSama - 03.11.2012, 21:38
Re: The LCS - by uNiKuL - 11.01.2013, 17:48
Re: The LCS - by gigicu01 - 12.01.2013, 14:15
Re: The LCS - by c0mrad3 - 19.01.2013, 19:21
Re: The LCS - by DiGiTaL_AnGeL - 19.01.2013, 19:26
Re: The LCS - by Dan.. - 20.01.2013, 11:07
Re: The LCS - by c0mrad3 - 20.01.2013, 11:49
Re: The LCS - by uNiKuL - 20.01.2013, 18:12
Re: The LCS - by joke95 - 24.02.2014, 19:14
Re: The LCS - by ElectroX - 04.03.2014, 21:24
Re: The LCS - by jazzyKISS - 24.09.2015, 19:00
Re: The LCS - by Mariciuc223 - 25.09.2015, 05:41

Forum Jump:


Users browsing this thread: 4 Guest(s)