Wie macht man eins? Und wie viele kann man max. haben?
Also wollte einzelnde Filter Scripts aus meinem richtigen Script machen, damit es für MICH übersichtlicher ist, z.B. der Befehl?
#include <a_samp>
#define Grau 0xAFAFAFAA
#define MAX_CARS 900
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(carrespawn,10,cmdtext);
return 1;
}
dcmd_carrespawn(playerid,params[])
{
#pragma unused params
if(IsPlayerConnected(playerid))
{
if(!IsPlayerAdmin(playerid))
{
return SendClientMessage(playerid,Grau,"Du bist kein Admin!");
}
new bool:unwanted[MAX_CARS];
for(new player=0; player<MAX_PLAYERS; player++)
{
if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
}
for(new car = 1; car <= 268; car++)
{
if(!unwanted[car]) SetVehicleToRespawn(car);
}
}
return 1;
}