simple command ZCMD
#6

PHP код:
#include <sscanf2>
CMD:changemission(playeridparams[])
{
    if(
IsPlayerAdmin(playerid)
    {
        new 
mission[50], cmd[50]; //strings
        
if(sscanf(params"s"mission)) return SendClientMessage(playerid, -1"USAGE: /changemission (mission)"); //if playerid doesnt type in mission name playerid will get error message
        
format(cmdsizeof(cmd), "changemode %s"mission); //formatting the string to be used in SendRconCommand
        
SendRconCommand(cmd); //calling the command and changing the gamemode     
    
}
    return 
1;

Links:
sscanf2 (needed to use code): https://sampforum.blast.hk/showthread.php?tid=570927
SendRconCommand: https://sampwiki.blast.hk/wiki/SendRconCommand
Reply


Messages In This Thread
simple command ZCMD - by Fantje - 10.10.2015, 17:55
Re: simple command ZCMD - by Logic_ - 10.10.2015, 17:57
Re: simple command ZCMD - by Fantje - 10.10.2015, 17:59
Re: simple command ZCMD - by AbyssMorgan - 10.10.2015, 18:01
Re: simple command ZCMD - by Logic_ - 10.10.2015, 18:01
Re: simple command ZCMD - by SnG.Scot_MisCuDI - 10.10.2015, 18:08
Re: simple command ZCMD - by Galhardo - 10.10.2015, 18:10
Re: simple command ZCMD - by Fantje - 10.10.2015, 18:35
Re: simple command ZCMD - by Stinged - 10.10.2015, 19:16

Forum Jump:


Users browsing this thread: 1 Guest(s)