Also mein Problem ist, dass ich ein Pickup erstellen will wenn jemand off geht. 1 Minute danach sollte es wieder verschwinden
Hier der Code
new OfflinePickup[MAX_PLAYERS];
new Text3D:Offline3DTextdraw[MAX_PLAYERS];
new OfflineVar[MAX_PLAYERS];
new Float:OfflinePos_x[MAX_PLAYERS], Float:OfflinePos_y[MAX_PLAYERS], Float:OfflinePos_z[MAX_PLAYERS];
new OfflineWanted[MAX_PLAYERS];
new OfflineName[MAX_PLAYER_NAME][MAX_PLAYERS];
Unter Onplayerdisconnect
/*if(OfflineVar[playerid] == 1) {
OfflineVar[playerid] = 0;
DestroyPickup(OfflinePickup[playerid]);
Delete3DTextLabel(Offline3DTextdraw[playerid]);
}*/
format(string, sizeof string, "Offline\n[%s]",SpielerName(playerid));
OfflineVar[playerid] = 1;
GetPlayerPos(playerid, OfflinePos_x[playerid],OfflinePos_y[playerid],OfflinePos_z[playerid]);
OfflineWanted[playerid] = Spieler[playerid][Wanted];
OfflineName[playerid] = SpielerName(playerid);
Offline3DTextdraw[playerid] = Create3DTextLabel(string, FARBE_Grad1, Pos_x, Pos_y, Pos_z, 10.0, GetPlayerVirtualWorld(playerid), 1);
OfflinePickup[playerid] = CreatePickup(1275, 23, Pos_x, Pos_y, Pos_z, GetPlayerVirtualWorld(playerid));
SetTimerEx("EineMinuteNachLogout",60000,0,"i",playerid);
Und hier die Funktion für den Timer der einen minute
Function EineMinuteNachLogout(playerid)
{
OfflineVar[playerid] = 0;
DestroyPickup(OfflinePickup[playerid]);
Delete3DTextLabel(Offline3DTextdraw[playerid]);
}
Wenn jemand eine Lösung hat
Danke schoneinmal im Vorraus
/EDIT Überschrift
oO Gehirnfail xD Vorher: Offline Pickup + 3D Text werden nicht erzählt