Započeo [JV:RP] Milos
•7. Dec. 2013.• Zaključano[Pomoc] TextDraw
220
pregleda
5
postova
Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
601
Postovi:
93
Teme:
Pridružio se:Sep. 2013
7. Dec. 2013.
Ime skripte: FC-RP
Opis Problema: textdaw mi se ne pokazuje evo to je fs glad i wc
Slika/Video:/
Nesto da dodate Pomoc
Opis Problema: textdaw mi se ne pokazuje evo to je fs glad i wc
/*
Namjestiti:
Kada igrac kupi hranu GiveGlad(playerid, glad);
Kada ide na wc: GiveWC(playerid, wc);
*/
#include
#define STARTING_GLAD 75
#define STARTING_WC 75
forward GladWCCheck(); // Funkcija koja igracim askida 1 glad i 1 wc
new PlayerText:GladWCText;
public OnGameModeInit() {
SetTimer("GladWCCheck", 60000, 1); //Namjetmao timer za svakih minutu da skida igracima po 1 glad i wc
AddPlayerClass(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
return 1; }
public OnPlayerConnect(playerid) {
SetPVarInt(playerid, "glad", STARTING_GLAD); // Govori igraecvu glad
SetPVarInt(playerid, "wc", STARTING_WC); // Govori igracev wc
SetPVarInt(playerid, "showinggw", 0); // Govori dali prikazuje text za glad i wc
//--------------------------------------------------
GladWCText = CreatePlayerTextDraw(playerid,497,100,"~g~Glad~w~: 100~n~~b~WC:~w~ 100");
PlayerTextDrawLetterSize(playerid,GladWCText,0.349999,1.600000);
PlayerTextDrawAlignment(playerid,GladWCText,0);
PlayerTextDrawBackgroundColor(playerid,GladWCText,0x000000FF);
PlayerTextDrawFont(playerid,GladWCText,2);
PlayerTextDrawUseBox(playerid,GladWCText,0);
PlayerTextDrawSetOutline(playerid,GladWCText,1);
PlayerTextDrawSetProportional(playerid,GladWCText,1);
PlayerTextDrawSetShadow(playerid,GladWCText,0);
//--------------------------------------------------
return 1; }
public OnPlayerSpawn(playerid) {
//Prikazujemo igracu wc/glad text ukoliko mu se ne prikazuje
if(GetPVarInt(playerid, "showinggw") == 0) {
SetPVarInt(playerid, "showinggw", 1);
UpdateGladWCText(playerid);
PlayerTextDrawShow(playerid, GladWCText); }
return 1; }
public GladWCCheck() {
for(new i=0;i if(IsPlayerConnected(i)) {
new Float:phealth; GetPlayerHealth(i, phealth);
GiveGlad(i, -1);
if(GetPVarInt(i, "glad") < 0) { SetPVarInt(i, "glad", 0); SetPlayerHealth(i, phealth-1); }
GiveWC(i, -1);
if(GetPVarInt(i, "wc") < 0) { SetPVarInt(i, "wc", 0); SetPlayerHealth(i, phealth-1); }
UpdateGladWCText(i); } }
return 1; }
stock GiveGlad(playerid, glad) {
SetPVarInt(playerid, "glad", GetPVarInt(playerid, "glad")+glad);
return 1; }
stock GiveWC(playerid, wc) {
SetPVarInt(playerid, "wc", GetPVarInt(playerid, "wc")+wc);
return 1; }
stock UpdateGladWCText(playerid) {
if(!IsPlayerConnected(playerid)) { return 1; }
new str;
format(str, sizeof(str), "~y~Glad~w~: %d~n~~y~WC:~w~ %d", GetPVarInt(playerid, "glad"), GetPVarInt(playerid, "wc"));
PlayerTextDrawSetString(playerid, GladWCText, str);
return 1; }Slika/Video:/
Nesto da dodate Pomoc
Forum Don
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
7,407
Postovi:
93
Teme:
Pridružio se:Nov. 2011
Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
601
Postovi:
93
Teme:
Pridružio se:Sep. 2013
8. Dec. 2013.
Bilo koja od ova tri da stavim ovako
Mozes li mi sve uradit kako treba
GladWCText = TextDrawHideForAll(playerid,497,100,"~g~Glad~w~: 100~n~~b~WC:~w~ 100"); imam ove warnige C:\Users\x7\Desktop\FC-RP.INFO\2013\Faction City\filterscripts\glad3.pwn(27) : warning 213: tag mismatch
C:\Users\x7\Desktop\FC-RP.INFO\2013\Faction City\filterscripts\glad3.pwn(27) : warning 202: number of arguments does not match definition
C:\Users\x7\Desktop\FC-RP.INFO\2013\Faction City\filterscripts\glad3.pwn(27) : warning 202: number of arguments does not match definition
C:\Users\x7\Desktop\FC-RP.INFO\2013\Faction City\filterscripts\glad3.pwn(27) : warning 202: number of arguments does not match definition
C:\Users\x7\Desktop\FC-RP.INFO\2013\Faction City\filterscripts\glad3.pwn(27) : warning 213: tag mismatchMozes li mi sve uradit kako treba
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava