11.04.2014, 22:44
(
Последний раз редактировалось KermitTheMysteryFrog; 11.04.2014 в 23:59.
)
EDIT:
Fixed:
If you want to use a your command instead od /rcon loadfs fsname you can edit this command:
Else you can make it only for admin just changing this:
To:
Thanks for Help
Fixed:
If you want to use a your command instead od /rcon loadfs fsname you can edit this command:
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/load", true))
{
SendRconCommand("loadfs cars");
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Loading cars.amx");
return 1;
// Returning 1 informs the server that the command has been processed.
// OnPlayerCommandText won't be called in other scripts.
}
return 0;
// Returning 0 informs the server that the command hasn't been processed by this script.
// OnPlayerCommandText will be called in other scripts until one returns 1.
// If no scripts return 1, the 'SERVER: Unknown Command' message will be shown.
}
PHP код:
SendRconCommand("loadfs cars");
PHP код:
if(IsPlayerAdmin(playerid))SendRconCommand("loadfs cars");