hallo mäddels habe kleines problem ich habe ein kleines cp geschrieben aber es möchte nicht so wie ich vll sieht jemand von euch denn fehler
/*
script copy right by world-of-reallife.de
geschrieben von 60Cent
Alle rechte vorbehalten
*/
#include <a_samp>
new String[256];
new script_version = 1;
new script_subversion = 3;
new Float:health;
new Showing[MAX_PLAYERS];
new Text:CP;
new Text:CP2;
forward UpdateCP();
public UpdateCP()
{
new Hour,Minute,Sec;
gettime(Hour,Minute,Sec);
format(String,sizeof(String),"V%d.%d Level: Health:%.0f Uhrzeit %02d:%02d",script_version, script_subversion,health,Hour+2,Minute);
TextDrawSetString(CP2,String);
return 1;
}
public OnFilterScriptInit()
{
print("CP by 60Cent!");
print(" 60´s Cp wurde geladen");
// Create the textdraws:
CP = TextDrawCreate(2.000000, 423.000000, " ©Info Pannel© CopyRight by WOR");
TextDrawBackgroundColor(CP, 255);
TextDrawFont(CP, 1);
TextDrawLetterSize(CP, 0.509999, 0.899999);
TextDrawColor(CP, 16777215);
TextDrawSetOutline(CP, 1);
TextDrawSetProportional(CP, 1);
TextDrawUseBox(CP, 1);
TextDrawBoxColor(CP, -1);
TextDrawTextSize(CP, 648.000000, -14.000000);
CP2 = TextDrawCreate(0.000000, 436.000000," ");
TextDrawBackgroundColor(CP2, -1);
TextDrawFont(CP2, 2);
TextDrawLetterSize(CP2, 0.529999, 1.300000);
TextDrawColor(CP2, 255);
TextDrawSetOutline(CP2, 0);
TextDrawSetProportional(CP2, 1);
TextDrawSetShadow(CP2, 0);
TextDrawUseBox(CP2, 1);
TextDrawBoxColor(CP2, -1347440726);
TextDrawTextSize(CP2, 681.000000, 663.000000);
SetTimer("UpdateCP",10,1);
return 1;
}
public OnFilterScriptExit()
{
TextDrawHideForAll(CP);
TextDrawDestroy(CP);
TextDrawHideForAll(CP2);
TextDrawDestroy(CP2);
return 1;
}
public OnPlayerConnect(playerid)
{
Showing[playerid] = 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/cp") && Showing[playerid] == 0)
{
if(Showing[playerid] == 1)
{
Showing[playerid] = 0;
TextDrawHideForPlayer(playerid, CP);
TextDrawHideForPlayer(playerid, CP2);
}
else
{
Showing[playerid] = 1;
TextDrawShowForPlayer(playerid, CP);
TextDrawShowForPlayer(playerid, CP2);
SetTimerEx("HideTextdraws", 100000, 0, "i", playerid);
}
}
return 1;
}
forward HideTextdraws(playerid);
public HideTextdraws(playerid)
{
Showing[playerid] = 0;
TextDrawHideForPlayer(playerid, CP);
TextDrawHideForPlayer(playerid, CP2);
}