Habe diesen Code hier
/*
-= Dynamic System By [U]214 =-
^^Credits : [___]P0thead - Help Getting Started, and helping me understand better the loading functions..
: Dracoblue - Dini
: ZeeX - ZCMD
: Y_Less - SSCANF Plugin
: Incognito - streamer plugin
** Pickups, Map Icons, Vehicles, 3D Text Labels are currently Dynamic!!!!
***READ - THE SAVE LOCATIONS FOR THE EACH DYNAMIC TYPE, MUST NOT BE THE SAME!!! AS YOU SEE ON THE DEFAUL SAVE LOCATIONS..
THAT IS THE WAY TO SAVE THEM..
***OTHER NOTE - WHEN YOU FIRST CREATE SOMETHING, A PICKUP, MAPICON, 3D LABEL, OR VEHICLE. IT WILL RETURN AN UNKNOWN COMMAND
REMEMBER, ONLY THE FIRST TIME YOU CREATE SOMETHING!!!!! AND THE REASON IS THAT IT CREATES THE 'ID' FILE TO KEEP
TRACK OF THE TOTAL DYNAMIC STUFF YOU GOT XD
*/
#include <a_samp>
#include <streamer>
#include <Dini>
#include <zcmd>
#include <sscanf2>
//==============================================================================
// 3D Text Labels
//==============================================================================
#define LABELFILE "Dynamic/3DLabels/%d.ini"
#define LABELIDFILE "Dynamic/3DLabels/id.ini"
#define MAX_LABELS 30
new
lIDFile[75],lFile[120];
enum LABEL_INFO
{
Text3D:LID,
LInfo[128],
Float:LabelX,
Float:LabelY,
Float:LabelZ,
VID
}
new lInfo[MAX_LABELS][LABEL_INFO];
new LabelUpdate;
forward SaveLabels();
public OnFilterScriptInit()
{
// 3D Labels
LoadLabels();
LabelUpdate = SetTimer("SaveLabels",5000,1);
print("\n\n**************** Dynamic System By [U]214 Loaded ****************\n\n"); // Don't remove this line ;)
return 1;
}
public OnFilterScriptExit()
{
// 3D Labels
print("\n\n*************** Dynamic System By [U]214 Unloaded ***************\n\n");
return 1;
}
//==============================================================================
// Labels
//==============================================================================
CMD:nkz(playerid, params[])
{
if(unformat(params,"s[128]",params)) return SendClientMessage(playerid,0xFFFFFF,"USAGE: /nkz [text]");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new VID = GetPlayerVehicleID(playerid);
CreateNormalKennzeichen(params,X,Y,Z,VID);
new Msg[128];
format(Msg,sizeof(Msg),"Kennzeichen erstellt (Description: %s)",params);
SendClientMessage(playerid, 0xFFFFFF,Msg);
return 1;
}
//==============================================================================
// 3D Text Labels
//==============================================================================
stock LoadLabels()
{
for(new x = 0; x <MAX_LABELS; x++)
{
format(lFile,sizeof(lFile),LABELFILE,x);
format(lInfo[x][LInfo], 100, "%s", dini_Get(lFile, "LInfo"));
lInfo[x][LabelX] = dini_Float(lFile,"LabelX");
lInfo[x][LabelY] = dini_Float(lFile,"LabelY");
lInfo[x][LabelZ] = dini_Float(lFile,"LabelZ");
lInfo[x][VID] = dini_Float(lFile,"VID");
lInfo[x][LID] = Create3DTextLabel(lInfo[x][LInfo],0x000000FF,lInfo[x][LabelX],lInfo[x][LabelY],lInfo[x][LabelZ],0);
Attach3DTextLabelToVehicle(lInfo[x][LInfo], VID, 0.0, 0.0, 0.0);
}
}
stock CreateNormalKennzeichen(name[], Float:x, Float:y, Float:z, VID)
{
format(lIDFile, sizeof(lIDFile), LABELIDFILE);
if(!dini_Exists(lIDFile))
{
dini_Create(lIDFile);
dini_IntSet(lIDFile, "Total 3D Labels:", -1);
}
else
{
dini_IntSet(lIDFile, "Total 3D Labels:", dini_Int(lIDFile, "Total 3D Labels:")+1);
}
new lID = dini_Int(lIDFile, "Total 3D Labels:");
format(lFile, sizeof(lFile), LABELFILE, lID);
if(!dini_Exists(lFile)) dini_Create(lFile);
format(lInfo[lID][LInfo], 100, "%s", name);
lInfo[lID][LabelX] = x;
lInfo[lID][LabelY] = y;
lInfo[lID][LabelZ] = z;
lInfo[lID][VID] = VID;
lInfo[lID][LID] = Create3DTextLabel(name,0x000000FF,x,y,z,0);
Attach3DTextLabelToVehicle(lInfo[lID][LID], VID, 0.0, 0.0, 0.0);
}
public SaveLabels()
{
for(new x=0; x<MAX_LABELS; x++)
{
format(lFile, sizeof(lFile), LABELFILE, x);
dini_Set(lFile, "LInfo", lInfo[x][LInfo]);
dini_FloatSet (lFile, "LabelX", lInfo[x][LabelX]);
dini_FloatSet (lFile, "LabelY", lInfo[x][LabelY]);
dini_FloatSet (lFile, "LabelZ", lInfo[x][LabelZ]);
dini_FloatSet (lFile, "VID" , lInfo[x][VID]);
}
}
mit diesen errors
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(87) : warning 219: local variable "VID" shadows a variable at a preceding level
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(88) : warning 213: tag mismatch
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(87) : warning 204: symbol is assigned a value that is never used: "VID"
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(108) : warning 213: tag mismatch
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(109) : warning 202: number of arguments does not match definition
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(110) : warning 217: loose indentation
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(110) : warning 213: tag mismatch
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(110) : warning 213: tag mismatch
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(114) : warning 219: local variable "VID" shadows a variable at a preceding level
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(135) : warning 213: tag mismatch
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(136) : warning 202: number of arguments does not match definition
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(137) : warning 213: tag mismatch
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(114) : warning 203: symbol is never used: "VID"
C:\Dokumente und Einstellungen\thomas\Desktop\Server\0_Aktuel+SQLl\Server\gamemodes\kennzeichen.pwn(64) : warning 204: symbol is assigned a value that is never used: "LabelUpdate"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
14 Warnings.
Wenn das einer Fertigbringt dann respekt
dann hätten wir auch endlich ein kennzeichensystem
mit dem man ingame kennzeichen macht und die auch gesavet werden