forward AtCash(playerid);
public AtCash(playerid){
new String[128];
format(String, sizeof(String), "Cash: %d", Player[playerid][rCash]);
TextDrawSetString(CashText, String);
CashText = TextDrawCreate(511.500000, 107.644447, "Cash:");
TextDrawLetterSize(CashText, 0.449999, 1.600000);
TextDrawAlignment(CashText, 1);
TextDrawColor(CashText, -1061109505);
TextDrawSetShadow(CashText, 0);
TextDrawSetOutline(CashText, 1);
TextDrawBackgroundColor(CashText, 51);
TextDrawFont(CashText, 0);
TextDrawSetProportional(CashText, 1);
TextDrawShowForPlayer(playerid, CashText);
return true;
}
|
Bom estou colocando o valor do "Cash" do player em Textdraw e estб dando este erro nгo sei o porque
error 017: undefined symbol "Player" PHP код:
|
|
Simbolo indefinido!
Quer dizer que nгo hб Variavel Player ou enum nгo sei como estб fazendo e creio eu que [i] й sу em Loop por causa da var... Tente trocar por playerid @OFF Se eu estiver errado me corrijam! |
|
error 029: invalid expression, assumed zero error 017: undefined symbol "rCash" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line |
Player[playerid][rCash] = DOF2_GetInt(file, "rCash");
new PlayerText:CashText[MAX_PLAYERS][1];
enum pInfo
{
pCash,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
//AS VARIAVEIS ESTГO ACIMA, COMO VOCК ESTAVA COLOCANDO Player[i][pCash]; com certeza esse player estб em um enum!
public OnPlayerConnect(playerid){
CashText[playerid][0] = CreatePlayerTextDraw(playerid, 494.800079, 101.146675, "");
PlayerTextDrawLetterSize(playerid, CashText[playerid][0], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, CashText[playerid][0], 1);
PlayerTextDrawColor(playerid, CashText[playerid][0], -1);
PlayerTextDrawSetShadow(playerid, CashText[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, CashText[playerid][0], 1);
PlayerTextDrawBackgroundColor(playerid, CashText[playerid][1], 255);
PlayerTextDrawFont(playerid, CashText[playerid][0], 3);
PlayerTextDrawSetProportional(playerid, CashText[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, CashText[playerid][0], 0);
return 1;
}
CMD:darcash(playerid){
PlayerInfo[playerid][pCash] = 200;
return 1;
}
forward TextDrawUpdate(playerid);
public TextDrawUpdate(playerid)
{
new STR[250];
format(STR, sizeof(STR), "~b~$~w~%d",PlayerInfo[playerid][pCash]);
PlayerTextDrawSetString(playerid,CashText[playerid][1], STR);
PlayerTextDrawShow(playerid,CashText[playerid][1]);
return 1;
}
public OnGamemodeInit()
{
SetTimer("TextDrawUpdate",1000,true);
return 1;
}