Hallo,
Ich wollte mein spawn befehl auf dem Stuntserver ändern das man es nur begrenz hat
wenn man ein befehl eingibt steht nur "Server: Unknown Command."
Könnt ihr es Korrigieren?
if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vehicle", true, 8) == 0)
{
new printkonsole[64],pname[18];
GetPlayerName(playerid,pname,sizeof(pname));
format(printkonsole,sizeof(printkonsole),"%s hat /vehicle eingegeben",pname);
printf(printkonsole);
new tmp[256];
new Float:x, Float:y, Float:z;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,ORANGE,">> Benutzung: /vehicle [Fahrzeugname] <<");
SendClientMessage(playerid,ORANGE,"> Tippe ein Fahrzeugnamen z.b /v Infernus <");
SendClientMessage(playerid,ORANGE,"> Fahrzeuge Spawnen <");
SendClientMessage(playerid,ORANGE,"> Andere Verknüpfungen: /v, /vehicle <");
return 1;
}
new vehicle = GetVehicleModelIDFromName(tmp);
if(vehicle < 400 || vehicle > 611)
{
SendClientMessage(playerid, ROT, "Diese Auto nicht gefunden");
return 1;
}
new Float:a;
GetPlayerFacingAngle(playerid, a);
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInAnyVehicle(playerid) == 1)
{
GetXYInFrontOfPlayerVehicles(playerid, x, y, 8);
}
else
{
GetXYInFrontOfPlayerVehicles(playerid, x, y, 5);
}
new PV1[MAX_PLAYERS] = 0,PV2[MAX_PLAYERS] = 0,PV3[MAX_PLAYERS] = 0,PV4[MAX_PLAYERS] = 0,PlayerVehicle[MAX_PLAYERS],PlayerVehicle2[MAX_PLAYERS],PlayerVehicle3[MAX_PLAYERS],PlayerVehicle4[MAX_PLAYERS];
new string[64];
if(PV1[playerid] == 0)
{
PlayerVehicle[playerid] = CreateVehicle(vehicle, x, y, z, a, -1, -1, -1);
PutPlayerInVehicle(playerid,PlayerVehicle[playerid],0);
format(string,sizeof(string),">> %s in Slot 1 gespawnt.",Fahrzeugnamen[vehicle - 400]);
SendClientMessage(playerid, 0x007800FF, string);
PV1[playerid] = 1;
if(PV2[playerid] == 0)
{
PlayerVehicle2[playerid] = CreateVehicle(vehicle, x, y, z, a, -1, -1, -1);
PutPlayerInVehicle(playerid,PlayerVehicle2[playerid],0);
format(string,sizeof(string),">> %s in Slot 2 gespawnt.",Fahrzeugnamen[vehicle - 400]);
SendClientMessage(playerid, 0x007800FF, string);
PV2[playerid] = 1;
if(PV3[playerid] == 0)
{
PlayerVehicle3[playerid] = CreateVehicle(vehicle, x, y, z, a, -1, -1, -1);
PutPlayerInVehicle(playerid,PlayerVehicle3[playerid],0);
format(string,sizeof(string),">> %s in Slot 3 gespawnt.",Fahrzeugnamen[vehicle - 400]);
SendClientMessage(playerid, 0x007800FF, string);
PV3[playerid] = 1;
if(PV4[playerid] == 0)
{
PlayerVehicle4[playerid] = CreateVehicle(vehicle, x, y, z, a, -1, -1, -1);
PutPlayerInVehicle(playerid,PlayerVehicle4[playerid],0);
format(string,sizeof(string),">> %s in Slot 4 gespawnt.",Fahrzeugnamen[vehicle - 400]);
SendClientMessage(playerid, 0x007800FF, string);
PV4[playerid] = 1;
}
else
{
format(string,sizeof(string),">> Alle Slots sind belegt,lösche sie mit /delall oder /del [ID].");
}
}
else
{
format(string,sizeof(string),">> Alle Slots sind belegt,lösche sie mit /delall oder /del [ID].");
}
}
else
{
format(string,sizeof(string),">> Alle Slots sind belegt,lösche sie mit /delall oder /del [ID].");
}
}
else
{
format(string,sizeof(string),">> Alle Slots sind belegt,lösche sie mit /delall oder /del [ID].");
}
return 1;
}
MFG Martinez