adjail command + Rep
#1

Hi Guys can anyone help me with my problem? i want to use this command because i have cnr server.. i want this command to have with reason i tried to figure out but its an error

Код:
dcmd_adjail(playerid,params[])
{
	new string[128];
	new ID;
	new cmdtime;
	if(sscanf(params, "ui", ID, cmdtime))
	{
	    SendClientMessage(playerid,COLOR_ERROR,"AeroBot: /adjail (Player Name/ID) (Seconds)");
	    return 1;
	}
	if(!IsPlayerConnected(ID))
	{
	    format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot jail them.");
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(IsSpawned[ID] != 1)
	{
	    format(string,sizeof(string),"%s(%d) is not spawned. You cannot jail them.");
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	format(string,sizeof(string),"[ADMIN] Administrator has jailed %s(%d) to San Fierro Prison for %d seconds.",PlayerName(ID),ID,cmdtime);
	SendClientMessageToAll(COLOR_ADMIN,string);
  	format(string,sizeof(string),"9[ADMIN] Administrator has jailed %s(%d) to San Fierro Prison for %d seconds.",PlayerName(ID),ID,cmdtime);
	IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
Can anyone help me make that command /adjail <ID> <Time> <Reason>

+ Rep Who Can help Me
Reply
#2

pawn Код:
dcmd_adjail(playerid,params[])
{
    new string[128], ID, cmdtime, reason;
    if(sscanf(params, "uis[128]", ID, cmdtime, reason))
    {
        SendClientMessage(playerid,COLOR_ERROR,"AeroBot: /adjail (Player Name/ID) (Seconds) (Reason)");
        return 1;
    }
    if(!IsPlayerConnected(ID))
    {
        format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot jail them.");
        SendClientMessage(playerid,COLOR_ERROR,string);
        return 1;
    }
    if(IsSpawned[ID] != 1)
    {
        format(string,sizeof(string),"%s(%d) is not spawned. You cannot jail them.");
        SendClientMessage(playerid,COLOR_ERROR,string);
        return 1;
    }
    format(string,sizeof(string),"[ADMIN] Administrator has jailed %s(%d) to San Fierro Prison for %d seconds. Reason: %d",PlayerName(ID),ID,cmdtime,reason);
    SendClientMessageToAll(COLOR_ADMIN,string);
    format(string,sizeof(string),"9[ADMIN] Administrator has jailed %s(%d) to San Fierro Prison for %d seconds. Reason: %d",PlayerName(ID),ID,cmdtime,reason);
    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
}
Reply
#3

Quote:
Originally Posted by RedJohn
Посмотреть сообщение
pawn Код:
dcmd_adjail(playerid,params[])
{
    new string[128], ID, cmdtime, reason;
    if(sscanf(params, "uis[128]", ID, cmdtime, reason))
    {
        SendClientMessage(playerid,COLOR_ERROR,"AeroBot: /adjail (Player Name/ID) (Seconds) (Reason)");
        return 1;
    }
    if(!IsPlayerConnected(ID))
    {
        format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot jail them.");
        SendClientMessage(playerid,COLOR_ERROR,string);
        return 1;
    }
    if(IsSpawned[ID] != 1)
    {
        format(string,sizeof(string),"%s(%d) is not spawned. You cannot jail them.");
        SendClientMessage(playerid,COLOR_ERROR,string);
        return 1;
    }
    format(string,sizeof(string),"[ADMIN] Administrator has jailed %s(%d) to San Fierro Prison for %d seconds. Reason: %d",PlayerName(ID),ID,cmdtime,reason);
    SendClientMessageToAll(COLOR_ADMIN,string);
    format(string,sizeof(string),"9[ADMIN] Administrator has jailed %s(%d) to San Fierro Prison for %d seconds. Reason: %d",PlayerName(ID),ID,cmdtime,reason);
    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
}
I Got 1 Error
Код:
C:\Users\GMZeus\Desktop\GTA SAMP Server\Ultimate Cops N Robbers\gamemodes\SFCRRPG.pwn(5141) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

Код:
dcmd_adjail(playerid,params[])
{
	new string[128];
	new ID;
	new cmdtime;
	new reason;
	if(sscanf(params, "uis[128]", ID, cmdtime, reason)) return SendClientMessage(playerid,COLOR_ERROR,"AeroBot: /adjail (Player Name/ID) (Seconds) (Reason)");
	if(!IsPlayerConnected(ID))
	{
	    format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot jail them.");
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(IsSpawned[ID] != 1)
	{
	    format(string,sizeof(string),"%s(%d) is not spawned. You cannot jail them.");
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	format(string,sizeof(string),"[ADMIN] Administrator has jailed %s(%d) to San Fierro Prison for %d seconds. Reason: %d",PlayerName(ID),ID,cmdtime,reason);
	SendClientMessageToAll(COLOR_ADMIN,string);
  	format(string,sizeof(string),"9[ADMIN] Administrator has jailed %s(%d) to San Fierro Prison for %d seconds. Reason: %d",PlayerName(ID),ID,cmdtime,reason);
	IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
}
Reply
#5

Crashes my Pawno Compiler.. Can you teamviewer me pls?
ID: 870 752 264
Password: 8szm28
Reply
#6

Don't post your Team Viewer details in public please. Send him a PM with those details.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)