[pomoc]utrke

Započeo MicroSD_, Februar 23, 2012, 18:07:23 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: NX
Detaljan opis problema: kako da od ove 2 komande napravim da mogu koristiti samo admini/gmovi. I da oni prozivaju igrace na utrke
Dio skripte: CMD:join(playerid,params[])
{
#pragma unused params

if(RaceParticipant[playerid]>0)
{
    SendClientMessage(playerid, COLOR_RED, "{F81414}(Odbijeno) {FFFFFF}Vec si se prijavio za utrku!");
}
else if(RaceActive==1 && RaceStart==0)
{
if(PrizeMode >= 2 && GetPlayerMoney(playerid) < JoinFee)
{
format(ystring,sizeof(ystring),"Nemas dovoljno novca da se prikljucis utrci! (Cijena pristupa: %d$)",JoinFee);
SendClientMessage(playerid, COLOR_YELLOW, ystring);
return 1;
}
else if (PrizeMode >= 2)
{
new tempval;
tempval=(-1)*JoinFee;
    GivePlayerMoney(playerid,tempval);
    Pot+=JoinFee;
}
CurrentCheckpoint[playerid]=0;
if(Racemode == 3)
{
SetRaceCheckpoint(playerid,LCurrentCheckpoint,LCurrentCheckpoint-1);
CurrentCheckpoint[playerid]=LCurrentCheckpoint;
}
else SetRaceCheckpoint(playerid, 0,1);
RaceParticipant[playerid]=1;
CurrentLap[playerid]=0;
SendClientMessage(playerid, COLOR_GREEN, "Pridruzio si se utrci!");
Participants++;

}
else if(RaceActive==1 && RaceStart==1)
{
    SendClientMessage(playerid, COLOR_YELLOW, "Utrka je vec pocela.");
}
else
{
    SendClientMessage(playerid, COLOR_YELLOW, "Nema utrke kojoj bi se mogao pridruziti.");
}
return 1;
}

CMD:ready(playerid, params[])
{
#pragma unused params
new PState=GetPlayerState(playerid);
if(RaceParticipant[playerid]==2 && PState != PLAYER_STATE_PASSENGER)
{
         SendClientMessage(playerid,COLOR_YELLOW,"spreman si za utrku");
RaceParticipant[playerid]=3;
ReadyRefresh();
}
else if (RaceParticipant[playerid]==3 && RaceStart==0)
{
    SendClientMessage(playerid,COLOR_YELLOW,"Sada nisi spreman! Koristi ponovo /ready da budes spreman.");
    RaceParticipant[playerid]=2;
}
else if (PState == PLAYER_STATE_PASSENGER) SendClientMessage(playerid,COLOR_YELLOW,"Moras biti vozac!");


    return 1;
}

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

ricken

Dodaj ovo
if(PlayerInfo[playerid][pAdmin] >= Ovdje admin lvl stavis)

Citat: Rickeη poslato Februar 23, 2012, 18:21:49 POSLE PODNE
Dodaj ovo
if(PlayerInfo[playerid][pAdmin] >= Ovdje admin lvl stavis)

ma znam to dodat, ali kako da napravim te 2 komande u 1...