a simple problem
#1

ok folks because i forget alot of stuff due to being old i made this cmd ages ago and it didnt work, then i forgot all about it, so i will know throw it open to someone to help me out please,its probally something realy easy,but my brain doesnt work at the moment

Код:
CMD:doughnut(playerid,params[]) {
	new giveplayerid,string[128],giveplayer[MAX_PLAYER_NAME],sendername[MAX_PLAYER_NAME];
	if (sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /doughnut <ID> ");
	if(PlayerInfo[playerid][Jailed] == 1) {
		SendClientMessage(playerid, COLOR_BRIGHTRED, "You are in jail and cannot use this command");
		return 1;}
	if (IsPlayerConnected(giveplayerid)){
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
	 	format(string, sizeof(string), "%s has given %s a doughnut,hope he doesnt leave crumbs every where", sendername, giveplayer);
		SendClientMessageToAll(COLOR_INDIGO, string);
		return 1;}
	else{
	 	format(string, sizeof(string), "ID:%d is not an active player ID number.", giveplayerid);
		SendClientMessage(playerid, COLOR_BRIGHTRED, string);}
	return 1;}
cheers for your help in advance
Reply
#2

So, what exactly doesn't work, apart from the fact that you're only sending messages?
Reply
#3

o sorry my bad,it is surpose to send a message to the player that he has been given a doughnut ,but thats the part that doesnt work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)