SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 10/06/2014, 01:50 PM   #1
saikumar
Banned
 
Join Date: Aug 2013
Location: India
Posts: 185
Reputation: 19
Default A command timmer? how can i

Hello guys so basicly i've got a command like this.

Code:
CMD:am(playerid, params[])
{
	if(IsAdmin(playerid))
	{
		new toid, message[65];
		if(sscanf(params, "us[65]", toid, message)) return Syntax(playerid, "[a]dmin[m]essage", "[playerid] [message]");
		if(strlen(message) > 65) return Error(playerid, "Your message cannot be longer than 65 characters.");
		if(!IsPlayerConnected(toid)) return Error(playerid, "That player is not connected!");
		new string[128];
		format(STRING, "Admin message from %s: %s", GetPlayerNameEx(playerid), message);
		SendClientMessageEx(toid, COLOR_GREEN, string);
		format(STRING, "Admin %s [%d] > %s [%d]: %s", GetPlayerNameEx(playerid), playerid, GetPlayerNameEx(toid), toid, message);
		SendAdminMessage(COLOR_GREEN,string);
		Log("logs/adminmessage.log", string);
	}
	else
	{
		new message[80];
		if(sscanf(params, "s[80]", message)) return Syntax(playerid, "[a]dmin[m]essage", "[message]");
		if(strlen(message) > 80) return Error(playerid, "Your message cannot be longer than 80 characters.");
		new string[128];
		format(STRING, "Admin message from %s [%d]: %s", GetPlayerNameEx(playerid), playerid, message);
		SendAdminMessage(COLOR_GREEN,string);
		format(STRING, "Your message, %s, has been sent.", message);
		SendClientMessageEx(playerid, COLOR_GREEN, string);
		format(STRING, "Player %s [%d] > Admins: %s", GetPlayerNameEx(playerid), playerid, message);
		Log("logs/adminmessage.log", string);
	}
	return 1;
}

How can i make a timmer so a play can only type that once every 1 minute?
saikumar is offline   Reply With Quote
Old 10/06/2014, 01:53 PM   #2
DrakeX
Banned
 
Join Date: Dec 2011
Posts: 73
Reputation: 49
Default Re: A command timmer? how can i

<Post removed>.

Last edited by DrakeX; 29/06/2014 at 07:09 AM.
DrakeX is offline   Reply With Quote
Old 10/06/2014, 01:55 PM   #3
saikumar
Banned
 
Join Date: Aug 2013
Location: India
Posts: 185
Reputation: 19
Default Re: A command timmer? how can i

thanks 1+ rep sir.
saikumar is offline   Reply With Quote
Old 10/06/2014, 01:59 PM   #4
BroZeus
High-roller
 
BroZeus's Avatar
 
Join Date: Jan 2014
Location: India
Posts: 1,405
Reputation: 173
Default Re: A command timmer? how can i

like this
pawn Code:
new bool:IsMinPassed[MAX_PLAYERS];//on top

public OnGameModeInit()
{
for(new i=0;i<=MAX_PLAYERS;i++)IsMinPassed[i]=true;
return 1;
}


forward Min(playerid);
public Min(playerid)
{
IsMinPassed=true;
return 1;
}



CMD:am(playerid,params[])
{

if(IsMinPassed!=true)return SendClientMessage(playerid,-1,"{ff0000}You can use this once in a min");
SetTimerEx("Min",1000*60,false,"i",playerid);
MinPassed[playerid]=false;
//rest of code
}

EDIT: Too late
__________________


"Be the change that you wish to see in the world."

Check out my Github profile!
BroZeus is offline   Reply With Quote
Old 10/06/2014, 02:04 PM   #5
kesarthakur
Big Clucker
 
Join Date: Nov 2013
Posts: 166
Reputation: 12
Default Re: A command timmer? how can i

This is my Friends Account..
His FB: www.********.com/kesarthakur35


Hello Admin,

i am saikumar who is a samp player
my samp forum account is stolen by a person due to my foolish ness.

My Email : Saikumarreddy9948@gmail.com
My Account: saikumar
My Old Pass: 8801209279

My Skype : saikumar.mallela
Proof : http://i.imgur.com/An9q1e4.jpg

My FB : www.********.com/saikumar.mallela
Proof : http://i.imgur.com/ITAxkYQ.jpg

My Full Name :Saikumar Reddy
Im From INDIA
the ip i used to login previously : 182.72.170.33 (from myipaddress.com)
(check my old posts...they are made with this)
My Friends in Account: Freaked , Kesarthakur, Bingo
My PMS....: Sent Approx 120 ... Received Approx 95

__________________________________________________ _____________

A person from SAMP PMed me that if i give him my account for a while he said he will help me in server thingy

http://i.imgur.com/4eFext1.jpg

so thats the mistake i did.... my foolishness.

please forgive me and get my Account back please

Hope i will get my account back... Please Email me new password of my account to saikumarreddy9948@gmail.com

i wont repeat this...im begging you...


Sorry for posting herer.......im out of my mind after my Account Stolen

My Account: http://forum.sa-mp.com/member.php?u=211116
kesarthakur is offline   Reply With Quote
Old 10/06/2014, 02:05 PM   #6
DrakeX
Banned
 
Join Date: Dec 2011
Posts: 73
Reputation: 49
Default Re: A command timmer? how can i

Quote:
Originally Posted by kesarthakur View Post
This is my Friends Account..
His FB: www.********.com/kesarthakur35


Hello Admin,

i am saikumar who is a samp player
my samp forum account is stolen by a person due to my foolish ness.

My Email : Saikumarreddy9948@gmail.com
My Account: saikumar
My Old Pass: 8801209279

My Skype : saikumar.mallela
Proof : http://i.imgur.com/An9q1e4.jpg

My FB : www.********.com/saikumar.mallela
Proof : http://i.imgur.com/ITAxkYQ.jpg

My Full Name :Saikumar Reddy
Im From INDIA
the ip i used to login previously : 182.72.170.33 (from myipaddress.com)
(check my old posts...they are made with this)
My Friends in Account: Freaked , Kesarthakur, Bingo
My PMS....: Sent Approx 120 ... Received Approx 95

__________________________________________________ _____________

A person from SAMP PMed me that if i give him my account for a while he said he will help me in server thingy

http://i.imgur.com/4eFext1.jpg

so thats the mistake i did.... my foolishness.

please forgive me and get my Account back please

Hope i will get my account back... Please Email me new password of my account to saikumarreddy9948@gmail.com

i wont repeat this...im begging you...


Sorry for posting herer.......im out of my mind after my Account Stolen
Okay...
DrakeX is offline   Reply With Quote
Old 10/06/2014, 02:14 PM   #7
kesarthakur
Big Clucker
 
Join Date: Nov 2013
Posts: 166
Reputation: 12
Default Re: A command timmer? how can i

More Proof From Skype Chat:

http://pastebin.com/YK7MmhbM
kesarthakur is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
i had this command in my gamemode, when i type this in game,it tells server unknow command? Chrisli520 Scripting Help 3 24/11/2013 11:02 AM
Executed ZCMD command returns SERVER: Unknown Command SexTourist Scripting Help 12 03/01/2012 04:38 PM
Timmer Issue Code_Red Help Archive 3 03/08/2010 05:37 PM


All times are GMT. The time now is 06:27 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.