Problem with race - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with race (
/showthread.php?tid=606905)
Problem with race -
Micko123 - 11.05.2016
Hey guys. I have this /startrace command and it goes like this
Код:
CMD:startrace(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3)
if(AutomaticRace == true) return SendClientMessage(playerid, RED, "<!> Automatske trke su ukljucene!");
if(BuildRace != 0) return SendClientMessage(playerid, RED, "<!> Neko gradi trku!");
if(RaceBusy == 0x01 || RaceStarted == 1) return SendClientMessage(playerid, RED, "<!> Vec je jedna trka u toku!");
if(isnull(params)) return SendClientMessage(playerid, RED, "<!> /startrace [ime trke]");
LoadRace(playerid, params);
return 1;
}
Now can you tell me why player that just registered can type /startrace and he can start it. Only admin should do this. I just don't know where is problem !!!!
Re: Problem with race -
Micko123 - 11.05.2016
Fixed
Код:
CMD:startrace(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
if(AutomaticRace == true)
{
SendClientMessage(playerid, RED, "<!> Automatske trke su ukljucene!");
return 1;
}
if(BuildRace != 0)
{
SendClientMessage(playerid, RED, "<!> Neko gradi trku!");
return 1;
}
if(RaceBusy == 0x01 || RaceStarted == 1)
{
SendClientMessage(playerid, RED, "<!> Vec je jedna trka u toku!");
return 1;
}
if(isnull(params))
{
SendClientMessage(playerid, RED, "<!> /startrace [ime trke]");
return 1;
}
LoadRace(playerid, params);
}
return 1;
}