Tag,
Ich habe da auf meinem Selfmade Deathmath script paar Befehle gemacht wen mann die eingibt kommt da SERVER: UNKNOWN COMMAND raus aber der befehl funkt und macht worauf ich ihn eingestellt habe
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/veh", cmdtext, true, 10) == 0)
{
//if(color2 < 0 || color2 > 252) { SendClientMessage(playerid, COLOR_GREY, "Fahrzeug Farbe kann nicht weniger als 0 oder mehr als 126 sein!"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
CreateVehicle(562, X,Y,Z, 0.0, 1, 1, -1);
return 0;
}
if (strcmp("/dm", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 1305.4924,2107.2405,11.0156);
SetPlayerVirtualWorld(playerid,0);
GivePlayerWeapon(playerid, 24, 100000);
GivePlayerWeapon(playerid, 29, 100000);
GivePlayerWeapon(playerid, 31, 100000);
GivePlayerWeapon(playerid, 25, 100000);
SetPlayerInterior(playerid,0);
var = 1;
return 0;
}
if (strcmp("/dm2", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 2618.9351,2721.8828,36.5386);
SetPlayerVirtualWorld(playerid,0);
GivePlayerWeapon(playerid, 24, 100000);
GivePlayerWeapon(playerid, 29, 100000);
GivePlayerWeapon(playerid, 31, 100000);
GivePlayerWeapon(playerid, 25, 100000);
SetPlayerInterior(playerid,0);
var = 1;
return 0;
}
if (strcmp("/dm3", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 4354.7001, -1682.3000, 25.5);
SetPlayerVirtualWorld(playerid,0);
GivePlayerWeapon(playerid, 24, 100000);
GivePlayerWeapon(playerid, 29, 100000);
GivePlayerWeapon(playerid, 31, 100000);
GivePlayerWeapon(playerid, 25, 100000);
SetPlayerInterior(playerid,0);
var = 1;
return 0;
}
if (strcmp("/Drift", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 5244.8095703125,-1926.2634277344,3.5736749172211);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
var = 1;
return 0;
}
if (strcmp("/dm4", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 1777.4000,-4740.3999,756.0000);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
GivePlayerWeapon(playerid, 24, 100000);
GivePlayerWeapon(playerid, 29, 100000);
GivePlayerWeapon(playerid, 31, 100000);
GivePlayerWeapon(playerid, 25, 100000);
var = 1;
return 0;
}
if (strcmp("/exit", cmdtext, true, 10) == 0)
if(var == 1)
{
SetPlayerPos(playerid,2481.3047,-1756.0822,13.5469);//Exit positionen
ResetPlayerWeapons(playerid);
}
if(var == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Du bist in keiner Arena!");
return 0;
}
return 1;
}
Befehle
- KinG.
- Geschlossen
- Erledigt
-
-
ich glaube statt return 1; einfach return 0;
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/veh", cmdtext, true, 10) == 0)
{
//if(color2 < 0 || color2 > 252) { SendClientMessage(playerid, COLOR_GREY, "Fahrzeug Farbe kann nicht weniger als 0 oder mehr als 126 sein!"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
CreateVehicle(562, X,Y,Z, 0.0, 1, 1, -1);
return 0;
}
if (strcmp("/dm", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 1305.4924,2107.2405,11.0156);
SetPlayerVirtualWorld(playerid,0);
GivePlayerWeapon(playerid, 24, 100000);
GivePlayerWeapon(playerid, 29, 100000);
GivePlayerWeapon(playerid, 31, 100000);
GivePlayerWeapon(playerid, 25, 100000);
SetPlayerInterior(playerid,0);
var = 1;
return 0;
}
if (strcmp("/dm2", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 2618.9351,2721.8828,36.5386);
SetPlayerVirtualWorld(playerid,0);
GivePlayerWeapon(playerid, 24, 100000);
GivePlayerWeapon(playerid, 29, 100000);
GivePlayerWeapon(playerid, 31, 100000);
GivePlayerWeapon(playerid, 25, 100000);
SetPlayerInterior(playerid,0);
var = 1;
return 0;
}
if (strcmp("/dm3", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 4354.7001, -1682.3000, 25.5);
SetPlayerVirtualWorld(playerid,0);
GivePlayerWeapon(playerid, 24, 100000);
GivePlayerWeapon(playerid, 29, 100000);
GivePlayerWeapon(playerid, 31, 100000);
GivePlayerWeapon(playerid, 25, 100000);
SetPlayerInterior(playerid,0);
var = 1;
return 0;
}
if (strcmp("/Drift", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 5244.8095703125,-1926.2634277344,3.5736749172211);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
var = 1;
return 0;
}
if (strcmp("/dm4", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 1777.4000,-4740.3999,756.0000);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
GivePlayerWeapon(playerid, 24, 100000);
GivePlayerWeapon(playerid, 29, 100000);
GivePlayerWeapon(playerid, 31, 100000);
GivePlayerWeapon(playerid, 25, 100000);
var = 1;
return 0;
}
if (strcmp("/exit", cmdtext, true, 10) == 0)
if(var == 1)
{
SetPlayerPos(playerid,2481.3047,-1756.0822,13.5469);//Exit positionen
ResetPlayerWeapons(playerid);
}
if(var == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Du bist in keiner Arena!");
return 0;
}
return 0;
} -
Nene, statt if(strcmp muss da if(!strcmp
Glaub ich halt :x -
breadfish.de
Hat das Thema geschlossen.