SA-MP Forums Archive
[HELP]Reload Fs problem. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]Reload Fs problem. (/showthread.php?tid=234144)



[HELP]Reload Fs problem. - [Aka]Dragonu - 03.03.2011

Hey. I just copied something from forum.sa-mp.com but i get a pawno error when compile here is the script :

pawn Код:
if(strcmp(cmd, "/reloadfs", true) == 0)
    {
      if (IsPlayerAdmin(playerid))
      {
      SendClientMessage(playerid, COLOR_BLUE, "SOLO LEAD / SCRIPTER / FOUNDER");
      }
   if (IsPlayerAdmin(playerid))
   {
   SendRconCommand("reloadfs BusSystem")
   SendClientMessage(playerid, COLOR_BLUE, "FS Ricaricate");
   }
   return 1;
 }
And here is the error :
pawn Код:
D:\Games\GTA San Andreas\server\gamemodes\slrpg.pwn(12406) : error 001: expected token: ";", but found "-identifier-"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Please help me...


Re: [HELP]Reload Fs problem. - Rachael - 03.03.2011

you forgot the semi-colan after SendRconMessage()


Re: [HELP]Reload Fs problem. - [Aka]Dragonu - 03.03.2011

What ?


Re: [HELP]Reload Fs problem. - smeti - 03.03.2011

Код:
SendRconCommand("reloadfs BusSystem");



Re: [HELP]Reload Fs problem. - HyperZ - 03.03.2011

Lol, look at your code, its only for rcon?

Only For Rcon Admin:
pawn Код:
if(strcmp(cmd, "/reloadfs", true) == 0)
{
    if(IsPlayerAdmin(playerid)) return 0;
    SendRconCommand("reloadfs BusSystem");
    SendClientMessage(playerid, COLOR_BLUE, "FS Ricaricate");
    return 1;
}



Re: [HELP]Reload Fs problem. - smeti - 03.03.2011

Quote:
Originally Posted by Clive
Посмотреть сообщение
Lol, look at your code, its only for rcon?

Only For Rcon Admin:
pawn Код:
if(strcmp(cmd, "/reloadfs", true) == 0)
{
    if(IsPlayerAdmin(playerid)) return 0;
    SendRconCommand("reloadfs BusSystem");
    SendClientMessage(playerid, COLOR_BLUE, "FS Ricaricate");
    return 1;
}
!
Код:
if(!IsPlayerAdmin(playerid)) return 0;



Re: [HELP]Reload Fs problem. - [Aka]Dragonu - 03.03.2011

Thank you. That solved me !


Re: [HELP]Reload Fs problem. - HyperZ - 03.03.2011

Quote:
Originally Posted by smeti
Посмотреть сообщение
!
Код:
if(!IsPlayerAdmin(playerid)) return 0;
Huh?, it'll works without "!" too.


Re: [HELP]Reload Fs problem. - [WF]Demon - 03.03.2011

no it wont, if you want an admin command than what you typed will let anyone type it, but logged into rcon it will not, so yes you need the "!" before IsPlayerAdmin for an admin only command