SA-MP Forums Archive
Help please ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help please ! (/showthread.php?tid=171670)



Help please ! - Danielo - 27.08.2010

It's posible to delete F4 function ?!
If yes,how?
Also i tried to add
CreateBan(giveplayerid)
for the /ban cmd
Also added the "new giveplayerid[MAX_PLAYER_NAME];"
and gives me
Код:
"C:\DOCUME~1\DANYEL~1\Desktop\SCRATC~1.3B\SERVER~1\FILTER~1\base.pwn(117) : error 035: argument type mismatch (argument 1)"
Line 117 it's this line "CreateBan(giveplayerid);"
Код:
//Ban Command
	if(strcmp("/ban", cmd, true) == 0)
	{
        CreateBan(giveplayerid);
	    if(IsPlayerAdmin(playerid)) {

			tmp = strtok(cmdtext,idx);
			if(!strlen(tmp) || strlen(tmp) > 5) {
				return SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"Usage: /ban (id) [reason]");
			}

			new id = strval(tmp);

			if(!IsPlayerConnected(id)) {
				SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"/ban : Bad player ID");
				return 1;
			}

			gMessage = strrest(cmdtext,idx);

			GetPlayerName(id,iName,sizeof(iName));
			SendClientMessage(id,ADMINFS_MESSAGE_COLOR,"-- You have been banned from the server.");

			if(strlen(gMessage) > 0) {
				format(Message,sizeof(Message),"Reason: %s",gMessage);
				SendClientMessage(id,ADMINFS_MESSAGE_COLOR,Message);
			}

			format(Message,sizeof(Message),">> %s(%d) has been banned.",iName,id);
			SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,Message);

			Ban(id);
			return 1;
		} else {
            SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"/ban : You are not an admin");
			return 1;
		}
	}
	
	return 0;
}
Thanx in advanced.


Re: Help please ! - Danielo - 27.08.2010

Anyone please?!


Re: Help please ! - Danielo - 27.08.2010

C'mon , anyone ?! please..


Re: Help please ! - Adil - 27.08.2010

Assign giveplayerid to the given id in /ban.
pawn Код:
giveplayerid = ReturnUser(tmp);
And no, it's not possible to delete the F4 system.


Re: Help please ! - Retardedwolf - 27.08.2010

Spawn the player at OnPlayerRequestClass with the last settings he has been using.


Re: Help please ! - Danielo - 27.08.2010

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
Spawn the player at OnPlayerRequestClass with the last settings he has been using.
Could you put here any code or w/e i'm newbie..sorry.