Jump to content
  • 0

Scorul scris ca TextDraw


Guest Alxxie

Question

Pe unele servere este sus in dreapta sub bani un text draw care iti spune ce scor ai.E ceva de genul "SCOR: 4".

Vreau si eu sa pun un textdraw dasta dar nu stiu cum.Am coordonatele unde vreu sa-l pun, am culorile dar mai departe nu mai stiu :-[.

M-am uitat prin niste scripturi cu speedometru pentru masini ca sa am model dar nu am inteles nimic din ce era acolo.

Ma poate ajuta cineva? :D

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

foloseste http://forum.sa-mp.com/index.php?topic=29132.0 pentru a crea textdraw

apoi il denumesti pe textdraw -thescore (ex- new Text:TextDraw1 - new Text:thescore etc)

apoi pui astea sus

new PlayerScore[MAX_PLAYERS];

new NewPlayerScore[MAX_PLAYERS];

si la OnPlayerUpdate:

    	NewPlayerScore[playerid] = GetPlayerScore(playerid);
	if(NewPlayerScore[playerid] != PlayerScore[playerid])
	{
	    new string[256];
            format(string,256,"Score:%d",NewPlayerScore[playerid]);	
	    TextDrawSetString(thescore,string);
	    PlayerScore[playerid] = NewPlayerScore[playerid];
	}

Link to comment
Share on other sites

Guest farse

Trebuie sa faci textdraw-ul pentru player..

new Text:thescore[MAX_PLAYERS];

Apoi la td-ul din scriptifiles,sau tdu care lai facut tu pui la toate [playerid](ex: thescore[playerid] = TextDrawCreate..) apoi il adaugi la OnPlayerConnect si la OnPlayerDisconnect pui TextDrawDestroy(thescore[playerid]);

Link to comment
Share on other sites

Nu Merge zice ca nu il cunoaste

: error 017: undefined symbol "playerid"

(25) : error 009: invalid array size (negative, zero or out of bounds)

(383) : error 046: unknown array size (variable "thescore")

(384) : error 035: argument type mismatch (argument 1)

(385) : error 035: argument type mismatch (argument 1)

(386) : error 035: argument type mismatch (argument 1)

(387) : error 035: argument type mismatch (argument 1)

(388) : error 035: argument type mismatch (argument 1)

(389) : error 035: argument type mismatch (argument 1)

(390) : error 035: argument type mismatch (argument 1)

(1787) : error 035: argument type mismatch (argument 2)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

11 Errors.

Link to comment
Share on other sites

Guest farse

N ai inlocuit tot...

Deci schimbi variabila si pui [MAX_PLAYERS];  new Text:thescore[MAX_PLAYERS];

Apoi la setarile din TD pui [playerid] , dupa thescore,si unde ai pus tu thescore pui thescore[playerid]

Si muti Td ul la OnPlayerConnect si la OnPlayerDisconnect pui TextDrawDestroy(thescore[playerid]);

daca nu iti merge si asa,da scriptu..

Link to comment
Share on other sites

nu ma lasa

tatic iPlayerChatTime[MAX_PLAYERS];
static szPlayerChatMsg[MAX_PLAYERS][128];




stock IsPlayerFlooding(playerid)
{
	if(GetTickCount() - iPlayerChatTime[playerid] < 2000)
	    return 1;

	return 0;
}


new ho1;
new ho2;
new ho3;
new ho4;
new PlayerScore[MAX_PLAYERS];
new NewPlayerScore[MAX_PLAYERS];
new Text:thescore[MAX_PLAYERS];
new Menu:chose;
new Menu:Fighting;
new Menu:Drink;
new car1;
new car2;
new car3;
new car4;
new car5;
new car6;
new car7;
new car8;
new car9;
new car10;
si erorile:
D:\0.3a R3 Server\gamemodes\sarp.pwn(383) : error 033: array must be indexed (variable "thescore")
D:\0.3a R3 Server\gamemodes\sarp.pwn(384) : error 035: argument type mismatch (argument 1)
D:\0.3a R3 Server\gamemodes\sarp.pwn(385) : error 035: argument type mismatch (argument 1)
D:\0.3a R3 Server\gamemodes\sarp.pwn(386) : error 035: argument type mismatch (argument 1)
D:\0.3a R3 Server\gamemodes\sarp.pwn(387) : error 035: argument type mismatch (argument 1)
D:\0.3a R3 Server\gamemodes\sarp.pwn(388) : error 035: argument type mismatch (argument 1)
D:\0.3a R3 Server\gamemodes\sarp.pwn(389) : error 035: argument type mismatch (argument 1)
D:\0.3a R3 Server\gamemodes\sarp.pwn(390) : error 035: argument type mismatch (argument 1)
D:\0.3a R3 Server\gamemodes\sarp.pwn(1787) : error 035: argument type mismatch (argument 2)
D:\0.3a R3 Server\gamemodes\sarp.pwn(2978) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


10 Errors.
astea sunt erorile fara inlocuire si cu inlocuire
D:\0.3a R3 Server\gamemodes\sarp.pwn(383) : error 017: undefined symbol "playerid"
D:\0.3a R3 Server\gamemodes\sarp.pwn(384) : error 017: undefined symbol "playerid"
D:\0.3a R3 Server\gamemodes\sarp.pwn(385) : error 017: undefined symbol "playerid"
D:\0.3a R3 Server\gamemodes\sarp.pwn(386) : error 017: undefined symbol "playerid"
D:\0.3a R3 Server\gamemodes\sarp.pwn(387) : error 017: undefined symbol "playerid"
D:\0.3a R3 Server\gamemodes\sarp.pwn(388) : error 017: undefined symbol "playerid"
D:\0.3a R3 Server\gamemodes\sarp.pwn(389) : error 017: undefined symbol "playerid"
D:\0.3a R3 Server\gamemodes\sarp.pwn(390) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


8 Errors.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.