[HELP]Reload Fs problem.
#1

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...
Reply
#2

you forgot the semi-colan after SendRconMessage()
Reply
#3

What ?
Reply
#4

Код:
SendRconCommand("reloadfs BusSystem");
Reply
#5

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;
}
Reply
#6

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;
Reply
#7

Thank you. That solved me !
Reply
#8

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

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)