-.- prob again
#1

help me out
Код:
dcmd_jail(playerid,params[])
{
    new id,string[128],time[64],pName[MAX_PLAYER_NAME],mName[MAX_PLAYER_NAME],reason[100];
    if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,"ERROR: You must be level 3");
        
    if(sscanf(params, "iss", id,time,reason)) return SendClientMessage(playerid,red,"USAGE: /jail [playerid] [time] [reason]");
    PInfo[id][Jailed] = 1;
	GetPlayerName(playerid, pName, MAX_PLAYER_NAME);GetPlayerName(id, mName, MAX_PLAYER_NAME);
    format(string,sizeof string,"||Administrator %s jailed %s [%i min's] [reason: %s]||",pName,mName,time,reason);
    SendClientMessageToAll(red,string);
    format(string, sizeof(string), "MyAdmin/Users/%s.ini", mName);
	dini_IntSet(string,"Jailed",1);
	SendClientMessage(id,red,"You are now still in jail");
	PutPlayerInJail(id);
	SetTimerEx("jailtimer",time,false,"d",id);
	return 1;
}
error
Код:
C:\Users\mike\Desktop\server\filterscripts\dadmin.pwn(846) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
1 Error.
error line
Quote:

SetTimerEx("jailtimer",time,false,"d",id);

Reply
#2

Quote:
Originally Posted by dark_clown
Посмотреть сообщение
help me out
Код:
dcmd_jail(playerid,params[])
{
    new id,string[128],time[64],pName[MAX_PLAYER_NAME],mName[MAX_PLAYER_NAME],reason[100];
    if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,"ERROR: You must be level 3");
        
    if(sscanf(params, "iss", id,time,reason)) return SendClientMessage(playerid,red,"USAGE: /jail [playerid] [time] [reason]");
    PInfo[id][Jailed] = 1;
	GetPlayerName(playerid, pName, MAX_PLAYER_NAME);GetPlayerName(id, mName, MAX_PLAYER_NAME);
    format(string,sizeof string,"||Administrator %s jailed %s [%i min's] [reason: %s]||",pName,mName,time,reason);
    SendClientMessageToAll(red,string);
    format(string, sizeof(string), "MyAdmin/Users/%s.ini", mName);
	dini_IntSet(string,"Jailed",1);
	SendClientMessage(id,red,"You are now still in jail");
	PutPlayerInJail(id);
	SetTimerEx("jailtimer",time,false,"d",id);
	return 1;
}
error
Код:
C:\Users\mike\Desktop\server\filterscripts\dadmin.pwn(846) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
1 Error.
error line
pawn Код:
if(sscanf(params, "iss", id,time,reason)) return SendClientMessage(playerid,red,"USAGE: /jail [playerid] [time] [reason]");
should be
pawn Код:
if(sscanf(params, "iis", id,time,reason)) return SendClientMessage(playerid,red,"USAGE: /jail [playerid] [time] [reason]");
If it gives you errors, use this:
pawn Код:
SetTimerEx("jailtimer",strval(time),false,"d",id);
Reply
#3

ohai DeathOnaStick thanks for u help this time
gonna test it
kthxbai
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)