SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 26/06/2013, 11:08 PM   #11
SwisherSweet
Huge Clucker
 
SwisherSweet's Avatar
 
Join Date: Sep 2012
Location: Insideurmom
Posts: 492
Reputation: 68
Default Re: OnPlayerUpdate

wtf? why do you have so mane new string? just make new string[128] or something or make is new string[1000];
__________________
retired owner of 2 servers...
SwisherSweet is offline   Reply With Quote
Old 27/06/2013, 04:43 AM   #12
[..MonTaNa..]
Huge Clucker
 
[..MonTaNa..]'s Avatar
 
Join Date: Feb 2013
Location: Sweden
Posts: 411
Reputation: 7
Default Re: OnPlayerUpdate

Removed.
__________________
FiRAT =)

Last edited by [..MonTaNa..]; 18/01/2014 at 09:25 PM.
[..MonTaNa..] is offline   Reply With Quote
Old 27/06/2013, 05:27 AM   #13
GODEX
Big Clucker
 
GODEX's Avatar
 
Join Date: Jun 2013
Location: USA
Posts: 89
Reputation: 17
Default Re: OnPlayerUpdate

Here you go, Use this. Custom Built stock for you

You need to make a stock CreateTextDrawForPlayer

Add player textdraws inside there then add this into onplayerupdate

Code:
public OnPlayerUpdate(playerid)
{
	if(gPlayerLogged[playerid] != 0)
	{
  		new Float:Health;
		GetPlayerHealth(playerid,Health);
		new humanity = AccountInfo[playerid][pHumanity];
		new newtext3[900], jtext[900], atext[900], btext[900];
		if(AccountInfo[playerid][pGroup] == 1) { jtext = "Survivor"; }
		else if(AccountInfo[playerid][pGroup] == 2) { jtext = "Bandit"; }
		else if(AccountInfo[playerid][pGroup] == 3) { jtext = "BadAss"; }
		if(AccountInfo[playerid][pBackPackType] == 0) { atext = "Small Pack"; }
		else if(AccountInfo[playerid][pBackPackType] == 1) { atext = "Medium Pack"; }
		else if(AccountInfo[playerid][pBackPackType] == 2) { atext = "Large Pack"; }
		else if(AccountInfo[playerid][pBackPackType] == 3) { atext = "Massive Pack"; }
		if(AccountInfo[playerid][pBloodBag] == 0) { btext = "Empty"; }
		else if(AccountInfo[playerid][pBloodBag] == 1) { btext = "Full"; }
		format( newtext3, sizeof ( newtext3 ), "Blood Amount: %.0f%~n~Humanity: %d~n~Rank: %s~n~Blood Bag: %s~n~Backpack: %s~n~Vip Level: %d",Health,humanity,jtext,btext,atext,AccountInfo[playerid][pVip]);
		TextDrawSetString(Textdraw4[playerid], newtext3);
 	}
        return 1;
}

Something like this
__________________

GODEX is offline   Reply With Quote
Old 27/06/2013, 06:16 AM   #14
[..MonTaNa..]
Huge Clucker
 
[..MonTaNa..]'s Avatar
 
Join Date: Feb 2013
Location: Sweden
Posts: 411
Reputation: 7
Default Re: OnPlayerUpdate

Removed.
__________________
FiRAT =)

Last edited by [..MonTaNa..]; 18/01/2014 at 09:26 PM.
[..MonTaNa..] is offline   Reply With Quote
Old 27/06/2013, 06:19 AM   #15
Parka
High-roller
 
Parka's Avatar
 
Join Date: Aug 2011
Location: Argentina
Posts: 1,666
Reputation: 318
Default Respuesta: OnPlayerUpdate

Paste the entire code and tell me what you want.
Parka is offline   Reply With Quote
Old 27/06/2013, 03:55 PM   #16
[..MonTaNa..]
Huge Clucker
 
[..MonTaNa..]'s Avatar
 
Join Date: Feb 2013
Location: Sweden
Posts: 411
Reputation: 7
Default Re: OnPlayerUpdate

Removed.
__________________
FiRAT =)

Last edited by [..MonTaNa..]; 18/01/2014 at 09:26 PM.
[..MonTaNa..] is offline   Reply With Quote
Old 27/06/2013, 05:56 PM   #17
[..MonTaNa..]
Huge Clucker
 
[..MonTaNa..]'s Avatar
 
Join Date: Feb 2013
Location: Sweden
Posts: 411
Reputation: 7
Default Re: OnPlayerUpdate

Won't appear if I do player textdraw, what can the problem be ?
__________________
FiRAT =)
[..MonTaNa..] is offline   Reply With Quote
Old 27/06/2013, 06:06 PM   #18
WillyP
High-roller
 
WillyP's Avatar
 
Join Date: Jul 2010
Location: England
Posts: 2,027
Reputation: 63
Default Re: OnPlayerUpdate

Only update the rest of the strings during a command otherwise you're constantly updating everything for no reason unless they use the command. Kills and deaths can be updated during the OnPlayerDeath function, and everything else can be updated using strings and being shown using TextDrawSetString, and TextDrawShowForPlayer.
__________________
once average now terrible
WillyP is offline   Reply With Quote
Old 27/06/2013, 07:24 PM   #19
[..MonTaNa..]
Huge Clucker
 
[..MonTaNa..]'s Avatar
 
Join Date: Feb 2013
Location: Sweden
Posts: 411
Reputation: 7
Default Re: OnPlayerUpdate

Removed.
__________________
FiRAT =)

Last edited by [..MonTaNa..]; 18/01/2014 at 09:26 PM.
[..MonTaNa..] is offline   Reply With Quote
Old 27/06/2013, 10:47 PM   #20
[..MonTaNa..]
Huge Clucker
 
[..MonTaNa..]'s Avatar
 
Join Date: Feb 2013
Location: Sweden
Posts: 411
Reputation: 7
Default Re: OnPlayerUpdate

Removed.
__________________
FiRAT =)

Last edited by [..MonTaNa..]; 18/01/2014 at 09:26 PM.
[..MonTaNa..] 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
Help with OnPlayerUpdate Cookie. Scripting Help 11 19/10/2012 11:09 AM
OnPlayerUpdate CoDeZ Scripting Help 2 10/07/2012 04:25 PM
OnPlayerUpdate: How much is too much? Jonny5 Scripting Help 4 25/04/2012 04:00 PM
OnPlayerUpdate ?? Gray Help Archive 7 01/05/2011 11:56 AM
OnPlayerUpdate Cypog Bug Reports 7 09/12/2010 06:37 PM


All times are GMT. The time now is 07:59 PM.


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