Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-06-09, 20:07


JestemSuperLIKE

Początkujący grafik






Wiek: 27
Na forum: 3694 dni
Posty: 133

Piwa: 6

Respekt: 40

Cze. Mam taki problem. Jak gracz jest jaki? i ma 0 zlece?, a jak ja wchodz? to mi wy?wietla td ?e mam 0 zlece?, a przecie? w bazie mam zrobione 1 zlecenie. A jak gracz wychodzi, i ja ponownie wchodz? to mi wczytuje te 1 zlecenie. Czemu tak? Wie kto? jak to rozwi?za??
Pawn

new PlayerText:Ilosc_Zlecen[MAX_PLAYERS];


w OnGameModeInit:
Pawn

SetTimer("Odswiez"1000true);


Pawn

forward Odswiez(playerid);
public Odswiez(playerid)
{    
    new s_td1[25];
    format(s_td1sizeof(s_td1), "Zlecenia:_%d"Player[playerid][Zlecenia]);
    PlayerTextDrawSetString(playeridIlosc_Zlecen[playerid], s_td1);

    return 1;
}


w OnPlayerConnect
Pawn

PlayerCreateTD(playerid)
{
    Ilosc_Zlecen[playerid] = CreatePlayerTextDraw(playerid580.000000435.000000"Zlecenia:_0");
    PlayerTextDrawFont(playeridIlosc_Zlecen[playerid], 1);
    PlayerTextDrawLetterSize(playeridIlosc_Zlecen[playerid], 0.2125001.000000);
    PlayerTextDrawTextSize(playeridIlosc_Zlecen[playerid], 400.00000017.000000);
    PlayerTextDrawSetOutline(playeridIlosc_Zlecen[playerid], 1);
    PlayerTextDrawSetShadow(playeridIlosc_Zlecen[playerid], 0);
    PlayerTextDrawAlignment(playeridIlosc_Zlecen[playerid], 1);
    PlayerTextDrawColor(playeridIlosc_Zlecen[playerid], -1);
    PlayerTextDrawBackgroundColor(playeridIlosc_Zlecen[playerid], 255);
    PlayerTextDrawBoxColor(playeridIlosc_Zlecen[playerid], 50);
    PlayerTextDrawUseBox(playeridIlosc_Zlecen[playerid], 0);
    PlayerTextDrawSetProportional(playeridIlosc_Zlecen[playerid], 1);
    PlayerTextDrawSetSelectable(playeridIlosc_Zlecen[playerid], 0);

    return 1;
}


w OnPlayerDisconnect
Pawn

PlayerDestroyTD(playerid)
{
    PlayerTextDrawDestroy(playeridIlosc_Zlecen[playerid]);
    return 1;
}


w OnPlayerSpawn
Pawn

PlayerShowTD(playerid)
{
    PlayerTextDrawShow(playeridIlosc_Zlecen[playerid]);
    return 1;
}


Podpis
By KML
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-10, 13:11


Virex_PL

Głos rozsądku






Wiek: 26
Na forum: 4187 dni
Posty: 170
Nick w MP: Virex_PL

Piwa: 31

Respekt: 120
Respekt: 120

https://pastebin.com/S4F3XXrb

Swoj? drog? PlayerShowTD(playerid) lepiej u?y? raz np w OnPlayerRequestSpawn.

Edit: Przed format dodaj " if(!IsPlayerConnected(playerid)) continue; "

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-10, 14:37


MG303







Wiek: 30
Na forum: 6418 dni
Posty: 654

Piwa: 2990

Respekt: 231,6
Respekt: 231,6Respekt: 231,6

Po drugie ?le u?ywasz SetTimer.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-10, 14:46


Virex_PL

Głos rozsądku






Wiek: 26
Na forum: 4187 dni
Posty: 170
Nick w MP: Virex_PL

Piwa: 31

Respekt: 120
Respekt: 120

W?a?nie przerobi?em tego timera bo by? nieprawid?owy.SetTimerEx nie u?ywa si? do tego typu rzeczy.

Postaw piwo autorowi tego posta
 

 
Tagi: zlecenia
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » zlecenia Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku