Script Request Thread #5

pawn Код:
forward TSTS_TimerFunction(text);
public TSTS_TimerFunction(text)
{
    TextDrawSetString(Text:text, " ");
    return OnTextDrawSetStringTimerEnd(Text:text);
}

forward OnTextDrawSetStringTimerEnd(Text:text);
stock TextDrawSetTimerString(Text:text, time)
{
    return SetTimerEx("TSTS_TimerFunction", time, 0, "i", _:text);
}

public OnTextDrawSetStringTimerEnd(Text:text)
{
    // Textdraw string is set to " " for now!
    return 1;
}
Reply

Thats oddamn awesome!
And u prtt much learned me lots of making ur own functs and callbacks!
Reply

im looking for vehicle selection dialog is there anything like that?
Reply

Quote:
Originally Posted by Ecstacy
Посмотреть сообщение
im looking for vehicle selection dialog is there anything like that?
http://forum.sa-mp.com/showthread.ph...t=vehicle+menu
Next time please use the feature called "Search"
Reply

i used ... i got some results but they didnt work in my server X(
Reply

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
I don't get what you mean, tell me what the command you want is supposed to do, maybe I could help more...
When member of CNN write command /live 1 (1 is ID of another player) It's like an interview with another player.
For example (chat): Mich (live): Hi Rich, how are you today?
Rich (live): Hi Mich, well, how are you?

Mich - CNN member
Rich - player

EDIT: I'm need this:
Код:
	if(strcmp(cmd, "/live", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
			{
			    if(TalkingLive[playerid] != 255)
			    {
			        SendClientMessage(playerid, COLOR_WHITE, "* Live Conversation ended.");
			        SendClientMessage(TalkingLive[playerid], COLOR_WHITE, "* Live Conversation ended.");
			        TogglePlayerControllable(playerid, 1);
			        TogglePlayerControllable(TalkingLive[playerid], 1);
		            TalkingLive[TalkingLive[playerid]] = 255;
			        TalkingLive[playerid] = 255;
			        return 1;
			    }
			    if(PlayerInfo[playerid][pNewsSkill] < 50)
				{
				    SendClientMessage(playerid, COLOR_GREY, "   Your News Reporter Skill is to low to talk Live with people !");
				    return 1;
				}
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /live [playerid/PartOfName]");
					return 1;
				}
				//giveplayerid = strval(tmp);
		        giveplayerid = ReturnUser(tmp);
				if (IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
						if (ProxDetectorS(5.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Talk Live with yourself!"); return 1; }
						    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

							format(string, sizeof(string), "* You offered %s to have a Live Conversation.", giveplayer);
							SendClientMessage(playerid, COLOR_WHITE, string);
							format(string, sizeof(string), "* %s offered you to have a Live Conversation, type (/accept live) to accept.", sendername);
							SendClientMessage(giveplayerid, COLOR_WHITE, string);
							LiveOffer[giveplayerid] = playerid;
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "   You are to far away from that player !");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "   Invalid ID/Name !");
				    return 1;
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "   You are not a News Reporter !");
			}
		}//not connected
		return 1;
	}
But in ZCMD
Reply

Can someone send me a Dynamic Faction System which allows the player to make a faction with the following types of factions:
1 Police dept
2 Medics
3 Fire Department
4 Prison Guard
5 Gang
6 Bus Company
7 Government
8 Hitman
10 National Guard

I want the commands to look something like:

[Faction Name]: Faction Commands

Also, I want it to be able to be Strcmp and Noob Freindly
Reply

Could somebody quickly whip me up a IsValidDate(datestring[]) function please?

Valid date MUST be like 01/01/2011. can't be 1/01/2011 or 1/1/2011, must have 01.
Reply

Quote:
Originally Posted by Ecstacy
Посмотреть сообщение
im looking for vehicle selection dialog is there anything like that?
https://sampforum.blast.hk/showthread.php?tid=240397
https://sampforum.blast.hk/showthread.php?tid=131715
https://sampforum.blast.hk/showthread.php?tid=26857

use any of them and change the cmd to /v :P
Reply

Hmm just a simple request.

Can someone make me a simple textdraw on the bottom of the screen?

Its all I need to know where and how and bla bla.

Thanks in advance.
Reply

Quote:
Originally Posted by FrostDoggy
Посмотреть сообщение
Hmm just a simple request.

Can someone make me a simple textdraw on the bottom of the screen?

Its all I need to know where and how and bla bla.

Thanks in advance.
pawn Код:
// On top of you script
new Text:Textdraw1;

// in OnGameModeInit
Textdraw1 = TextDrawCreate(449.000000, 421.000000, "You text here");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 3);
TextDrawLetterSize(Textdraw1, 0.450000, 1.000000);
TextDrawColor(Textdraw1, -16776961);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);

and

//OnPlayerConnect
for(new i = 0; i < MAX_PLAYERS; i++)
{
    ShowTextDrawForPlayer(playerid, Textdraw1);
}
Reply

Quote:
Originally Posted by FrostDoggy
Посмотреть сообщение
Hmm just a simple request.

Can someone make me a simple textdraw on the bottom of the screen?

Its all I need to know where and how and bla bla.

Thanks in advance.
https://sampforum.blast.hk/showthread.php?tid=117851

Simply use that filterscript and you will know how easy it is.
Reply

I need a /roledice command, ex: if a player does /dice it will show: *player throwed 2 dice cubes that landed on [random number] and [random number]. Please people help

p.s random number should be from 1 to 6
Reply

Quote:
Originally Posted by MP2
Посмотреть сообщение
Could somebody quickly whip me up a IsValidDate(datestring[]) function please?

Valid date MUST be like 01/01/2011. can't be 1/01/2011 or 1/1/2011, must have 01.
10 seconds for you. Feedback for me.
Edit: fixed bugs like 00/00/2001, link updated^^
pawn Код:
public OnFilterScriptInit()
{
    TIMER(0);
    LOOP(10_000) IsValidDate("04/08/1995");
    TIMER(1);
    printf("%d ms", TIME(0));
    printf("%d", IsValidDate("01/01/2011"));
    printf("%d", IsValidDate("1/12/2011"));
    printf("%d", IsValidDate("01/01/860"));
    printf("%d", IsValidDate("01/14/2011"));
    printf("%d", IsValidDate("01/2a/2011"));
    printf("%d", IsValidDate("28/02/2011"));
    printf("%d", IsValidDate("28/02/2008"));
    printf("%d", IsValidDate("29/02/2008"));
    printf("%d", IsValidDate("30/02/2008"));

}
Quote:

25 ms
1
0
0
0
0
1
1
1
0

Reply

Im looking for certain script like this:
/set3dtext - Sets a 3dtext above playerz head
PM me if you know it
Reply

hello,how can I make that it's showing * instead of letters and nubers in register/login dialog.
Reply

Quote:
Originally Posted by ivanVU
Посмотреть сообщение
hello,how can I make that it's showing * instead of letters and nubers in register/login dialog.
Sorry this isnt currently possible in dialogs :/
Reply

Can someone send me a Dynamic Faction System which allows the player to make a faction with the following types of factions:
1 Police dept
2 Medics
3 Fire Department
4 Prison Guard
5 Gang
6 Bus Company
7 Government
8 Hitman
10 National Guard

I want the commands to look something like:

[Faction Name]: Faction Commands

Also, I want it to be able to be Strcmp and Noob Freindly
Reply

I'm need command /live for CNN:

When member of CNN write command /live 1 (1 is ID of another player) It's like an interview with another player.
For example (chat): Mich (live): Hi Rich, how are you today?
Rich (live): Hi Mich, well, how are you?

Mich - CNN member
Rich - player

EDIT: I'm need this:
Код:
	if(strcmp(cmd, "/live", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
			{
			    if(TalkingLive[playerid] != 255)
			    {
			        SendClientMessage(playerid, COLOR_WHITE, "* Live Conversation ended.");
			        SendClientMessage(TalkingLive[playerid], COLOR_WHITE, "* Live Conversation ended.");
			        TogglePlayerControllable(playerid, 1);
			        TogglePlayerControllable(TalkingLive[playerid], 1);
		            TalkingLive[TalkingLive[playerid]] = 255;
			        TalkingLive[playerid] = 255;
			        return 1;
			    }
			    if(PlayerInfo[playerid][pNewsSkill] < 50)
				{
				    SendClientMessage(playerid, COLOR_GREY, "   Your News Reporter Skill is to low to talk Live with people !");
				    return 1;
				}
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /live [playerid/PartOfName]");
					return 1;
				}
				//giveplayerid = strval(tmp);
		        giveplayerid = ReturnUser(tmp);
				if (IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
						if (ProxDetectorS(5.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Talk Live with yourself!"); return 1; }
						    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

							format(string, sizeof(string), "* You offered %s to have a Live Conversation.", giveplayer);
							SendClientMessage(playerid, COLOR_WHITE, string);
							format(string, sizeof(string), "* %s offered you to have a Live Conversation, type (/accept live) to accept.", sendername);
							SendClientMessage(giveplayerid, COLOR_WHITE, string);
							LiveOffer[giveplayerid] = playerid;
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "   You are to far away from that player !");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "   Invalid ID/Name !");
				    return 1;
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "   You are not a News Reporter !");
			}
		}//not connected
		return 1;
	}
But in ZCMD
Reply

Quote:
Originally Posted by kodiak
Посмотреть сообщение
I'm need command /live for CNN:

When member of CNN write command /live 1 (1 is ID of another player) It's like an interview with another player.
For example (chat): Mich (live): Hi Rich, how are you today?
Rich (live): Hi Mich, well, how are you?

Mich - CNN member
Rich - player

EDIT: I'm need this:
Код:
	if(strcmp(cmd, "/live", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
			{
			    if(TalkingLive[playerid] != 255)
			    {
			        SendClientMessage(playerid, COLOR_WHITE, "* Live Conversation ended.");
			        SendClientMessage(TalkingLive[playerid], COLOR_WHITE, "* Live Conversation ended.");
			        TogglePlayerControllable(playerid, 1);
			        TogglePlayerControllable(TalkingLive[playerid], 1);
		            TalkingLive[TalkingLive[playerid]] = 255;
			        TalkingLive[playerid] = 255;
			        return 1;
			    }
			    if(PlayerInfo[playerid][pNewsSkill] < 50)
				{
				    SendClientMessage(playerid, COLOR_GREY, "   Your News Reporter Skill is to low to talk Live with people !");
				    return 1;
				}
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /live [playerid/PartOfName]");
					return 1;
				}
				//giveplayerid = strval(tmp);
		        giveplayerid = ReturnUser(tmp);
				if (IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
						if (ProxDetectorS(5.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Talk Live with yourself!"); return 1; }
						    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

							format(string, sizeof(string), "* You offered %s to have a Live Conversation.", giveplayer);
							SendClientMessage(playerid, COLOR_WHITE, string);
							format(string, sizeof(string), "* %s offered you to have a Live Conversation, type (/accept live) to accept.", sendername);
							SendClientMessage(giveplayerid, COLOR_WHITE, string);
							LiveOffer[giveplayerid] = playerid;
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "   You are to far away from that player !");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "   Invalid ID/Name !");
				    return 1;
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "   You are not a News Reporter !");
			}
		}//not connected
		return 1;
	}
But in ZCMD
if this is a working cmd then you can use the cmd converter
Reply


Forum Jump:


Users browsing this thread: 29 Guest(s)