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.
  • Similar Content

    • By seek nephrite
      Salut, imi explica cineva cum fac o ruleta gen cu textdraw-uri cum e pe ruby nephrite? Adica sa arate numele si textdraw ul fiecarui obiect pe care il pun eu in ruleta, etc
    • By EclyseRPGADV
      Salut asta este primul meu textdraw postat.
      Sper sa va placa!
      https://pastebin.com/jtR7AH8v

       
    • By salexm93
      Salutare 
      Poate nu inteleg eu bine , pe wiki scrie max 2048 globale si 256 per player .
      Sa luam cazul ipotetic al unui server cu 1000 de playeri online .
      new Text:xpbar[MAX_PLAYERS]; new Text:playername[MAX_PLAYERS]; Aici vor fi 2000 create ? Adica destul de aproape de limita
       
      new PlayerText:xpbar[MAX_PLAYERS]; new PlayerText:playername[MAX_PLAYERS]; Iar Aici vor fi doar 2 ?
      Totodata , PlayerTextDrawDestroy ,la onplayerdisconnect ?
    • By IosifR
      re astazi am sa va prezint 'buletinul' care l am facut cu nikk's textdraw editor
      Am stat vreo 10m sa-l fac
      Zic ca-i bun pt un sv mai roleplay
    • By Serban
      Salutare, astazi vreau sa va impartesesc textdraw-ul de licente facut de mine.
       
      Sursa cod: Aici!
      Poze: Aici!
       
      Va salut si spor la programat! (Daca m-ai programeaza cineva..)
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.