forward GeldTimer(playerid);
public GeldTimer(playerid)
{
new string[48];
format(string, sizeof(string), "$%d", PlayerInfo[playerid][pCash]);
TextDrawSetString(geldanzeige, string);
return 1;
}
geldanzeige = TextDrawCreate(498.000000, 79.000000, "$15000000");
TextDrawBackgroundColor(geldanzeige, 255);
TextDrawFont(geldanzeige, 2);
TextDrawLetterSize(geldanzeige, 0.470000, 1.899999);
TextDrawColor(geldanzeige, -1);
TextDrawSetOutline(geldanzeige, 0);
TextDrawSetProportional(geldanzeige, 1);
TextDrawSetShadow(geldanzeige, 1);
TextDrawUseBox(geldanzeige, 1);
TextDrawBoxColor(geldanzeige, 255);
TextDrawTextSize(geldanzeige, 607.000000, 199.000000);
Do i have to add [playerid] or [i] at the textdraw code to show it for the player? because i use a custom money system with textdraw, here is the code
pawn Код:
pawn Код:
|
forward GeldTimer(playerid);
public GeldTimer(playerid)
{
new string[48];
format(string, sizeof(string), "$%d", PlayerInfo[playerid][pCash]);
TextDrawSetString(geldanzeige[playerid], string);
return 1;
}
new geldanzeige[MAX_PLAYERS];//at top
geldanzeige[playerid] = TextDrawCreate(498.000000, 79.000000, "$15000000");
TextDrawBackgroundColor(geldanzeige, 255);
TextDrawFont(geldanzeige, 2);
TextDrawLetterSize(geldanzeige, 0.470000, 1.899999);
TextDrawColor(geldanzeige, -1);
TextDrawSetOutline(geldanzeige, 0);
TextDrawSetProportional(geldanzeige, 1);
TextDrawSetShadow(geldanzeige, 1);
TextDrawUseBox(geldanzeige, 1);
TextDrawBoxColor(geldanzeige, 255);
TextDrawTextSize(geldanzeige, 607.000000, 199.000000);
C:\Users\Stefanche16\Desktop\sunsetcity_roleplay\gamemodes\sunsetcity.pwn(14197) : error 028: invalid subscript (not an array or too many subscripts): "geldanzeige"
C:\Users\Stefanche16\Desktop\sunsetcity_roleplay\gamemodes\sunsetcity.pwn(14197) : warning 215: expression has no effect
C:\Users\Stefanche16\Desktop\sunsetcity_roleplay\gamemodes\sunsetcity.pwn(14197) : error 001: expected token: ";", but found "]"
C:\Users\Stefanche16\Desktop\sunsetcity_roleplay\gamemodes\sunsetcity.pwn(14197) : error 029: invalid expression, assumed zero
C:\Users\Stefanche16\Desktop\sunsetcity_roleplay\gamemodes\sunsetcity.pwn(14197) : fatal error 107: too many error messages on one line
TextDrawSetString(geldanzeige[playerid], string);
TextDrawBackgroundColor(geldanzeige, 255);
TextDrawFont(geldanzeige, 2);
TextDrawLetterSize(geldanzeige, 0.470000, 1.899999);
TextDrawColor(geldanzeige, -1);
TextDrawSetOutline(geldanzeige, 0);
TextDrawSetProportional(geldanzeige, 1);
TextDrawSetShadow(geldanzeige, 1);
TextDrawUseBox(geldanzeige, 1);
TextDrawBoxColor(geldanzeige, 255);
TextDrawTextSize(geldanzeige, 607.000000, 199.000000);
pawn Код:
|
new Text:geldanzeige[MAX_PLAYERS];// top of script
// Under OnPlayerConnect..
geldanzeige[playerid] = TextDrawCreate(498.000000, 79.000000, "$15000000");
* * TextDrawBackgroundColor(geldanzeige[playerid], 255);
* * TextDrawFont((geldanzeige[playerid], 2);
* * TextDrawLetterSize(geldanzeige[playerid] 0.470000, 1.899999);
* * TextDrawColor(geldanzeige[playerid], -1);
* * TextDrawSetOutline(geldanzeige[playerid], 0);
* * TextDrawSetProportional(geldanzeige[playerid], 1);
* * TextDrawSetShadow(geldanzeige[playerid], 1);
* * TextDrawUseBox(geldanzeige[playerid], 1);
* * TextDrawBoxColor(geldanzeige[playerid], 255);
* * TextDrawTextSize(geldanzeige[playerid], 607.000000, 199.000000);