Pour plus de facilité, on peut même transformer ces commandes RCON en commandes tout court :
Dans OnPlayerCommandText :
/* Charger le FS TOTO */
if (strcmp (cmdtext, "/ltoto", true) == 0)
{
if (IsPlayerAdmin (playerid))
{
SendRconCommand ("loadfs toto");
}
return 1;
}
/* Decharger le FS TOTO */
if (strcmp (cmdtext, "/utoto", true) == 0)
{
if (IsPlayerAdmin (playerid))
{
SendRconCommand ("unloadfs toto");
}
return 1;
}Dans cet exemple, le FS s'appelle toto. Pour un autre FS, il suffit de remplacer tout les "toto" du script ci-dessus avec le vrai nom du FS.
++
Syg