14.08.2015, 22:56
PHP код:
#include a_samp
new PlayerText:TakelotP[MAX_PLAYERS];
#if defined FILTERSCRIPT
#else
public OnFilterScriptInit(){return print("\n||FILTERSCRIPT BY: iTakelot PATENTE LIGADO||\n");}
public OnFilterScriptExit(){return print("\n||FILTERSCRIPT BY: iTakelot PATENTE DESLIGADO||\n");}
#endif
public OnPlayerConnect(playerid)
{
TakelotP[playerid] = CreatePlayerTextDraw(playerid, 40.000000,322.000000,"Patente: "); //Crie sua textdraw
PlayerTextDrawAlignment(playerid, TakelotP[playerid],0);
PlayerTextDrawBackgroundColor(playerid,TakelotP[playerid],0x000000ff);
PlayerTextDrawFont(playerid,TakelotP[playerid],2);
PlayerTextDrawLetterSize(playerid,TakelotP[playerid],0.199999,1.500000);
PlayerTextDrawColor(playerid,TakelotP[playerid],0x00ff00ff);
PlayerTextDrawSetProportional(playerid,TakelotP[playerid],1);
PlayerTextDrawSetShadow(playerid, TakelotP[playerid],1);
PlayerTextDrawSetOutline(playerid, TakelotP[playerid], 1);
PlayerTextDrawShowForPlayer(playerid, TakelotP);
return 1;
}
public OnPlayerUpdate(playerid)
{
new str[50];
if(GetPlayerScore(playerid) >= 10){
format(str, sizeof(str), "~g~Patente: ~w~Novato");
PlayerTextDrawSetString(playerid,TakelotP[playerid], str);}
if(GetPlayerScore(playerid) >= 300){
format(str, sizeof(str), "~g~Patente: ~w~mediano");
PlayerTextDrawSetString(playerid,TakelotP[playerid], str);}
if(GetPlayerScore(playerid) >= 600){
format(str, sizeof(str), "~g~Patente: ~w~amador");
PlayerTextDrawSetString(playerid,TakelotP[playerid], str);}
if(GetPlayerScore(playerid) >= 1000){
format(str, sizeof(str), "~g~Patente: ~w~master");
PlayerTextDrawSetString(playerid,TakelotP[playerid], str);}
return 1;
}