public Wanted(playerid) { if(GetPlayerWantedLevel(playerid) > 0) { TextDrawSetString(Text:Wanted, "1 star~n~use /fine for ~g~1000"); return 1; } if(GetPlayerWantedLevel(playerid) > 1) { TextDrawSetString(Text:Wanted, "2 stars~n~use /fine for ~g~2000"); return 1; } if(GetPlayerWantedLevel(playerid) > 2) { TextDrawSetString(Text:Wanted, "3 stars~n~use /fine for ~g~3000"); return 1; } if(GetPlayerWantedLevel(playerid) > 3) { TextDrawSetString(Text:Wanted, "4 stars~n~use /fine for ~g~4000"); return 1; } if(GetPlayerWantedLevel(playerid) > 4) { TextDrawSetString(Text:Wanted, "5 stars~n~use /fine for ~g~5000"); return 1; } if(GetPlayerWantedLevel(playerid) > 5) { TextDrawSetString(Text:Wanted, "6 stars~n~use /fine for ~g~6000"); return 1; } return 1; }
error 076: syntax error in the expression, or invalid function call
public Wanted(playerid)
{
if(GetPlayerWantedLevel(playerid) >= 1)
{
new string[60];
format(string,sizeof(string),"%d star~n~use /fine for ~g~1000",GetPlayerWantedLevel(playerid));
TextDrawSetString(Wanted, string);
}
return 1;
}
TextDrawSetString(Text:Wanted, "1 stars~n~use /fine for ~g~1000");
TextDrawSetString(Wanted, "1 stars~n~use /fine for ~g~1000");
if(GetPlayerWantedLevel(playerid) >= 1) { TextDrawSetString(Wanted, "1 star~n~use /fine for ~g~1000"); //Error syntax error in the expression, or invalid function call Wanted = TextDrawCreate(497.000000, 129.000000, " "); //Error syntax error in the expression, or invalid function call TextDrawFont(Wanted, 1); //Error syntax error in the expression, or invalid function call TextDrawLetterSize(Wanted, 0.310000, 1.499999); //Error syntax error in the expression, or invalid function call }
public OnPlayerUpdate(playerid)
{
if(GetPlayerWantedLevel(playerid) >= 1)
{
new string[124];
format(string, sizeof(string), "%d stars~n~use /fine for ~g~%d000", GetPlayerWantedLevel(playerid), GetPlayerWantedLevel(playerid));
TextDrawSetString(Wanted, string);
ShowTextDrawForPlayer(playerid, Wanted);
}
else if(GetPlayerWantedLevel(playerid) == 0)
{
TextDrawHideForPlayer(playerid, Wanted);
}
return 1;
}
pawn Код:
|