Wenn ich den Befehl /aduty eingebe crasht der Server, /agive funktioniert. Wieso? Habe die returns gecheckt und es scheint richtig.
Frage 2: Wie mach ich das nochmal wenn ich z.B. /agive [Waffenid] [Munition] als Textbefehl habe, ich denn GivePlayerWeapon(playerid, PlayerInput1, PlayerInput2) gebe? So lang ists her dass ich gescripted habe...
Code
v0.3.7-R2, (C)2005-2015 SA-MP Team
[20:55:55] filterscripts = "" (string)
[20:55:55]
[20:55:55] Server Plugins
[20:55:55] --------------
[20:55:55] Loading plugin: mysql
[20:55:55] >> plugin.mysql: R39-5 successfully loaded.
[20:55:55] Loaded.
[20:55:55] Loaded 1 plugins.
[20:55:55]
[20:55:55] Filterscripts
[20:55:55] ---------------
[20:55:55] Loaded 0 filterscripts.
[20:55:55] [MySQL] Verbindungsaufbau...
[20:55:55] [MySQL] Die Verbindung zur Datenbank wurde erfolgreich hergestellt! Handle: 1
[20:55:55]
----------------------------------
[20:55:55] Reallife Roleplay Script by Vause
[20:55:55] ----------------------------------
[20:55:55] Number of vehicle models: 0
[20:56:15] [connection] 127.0.0.1:65025 requests connection cookie.
[20:56:16] [connection] incoming connection: 127.0.0.1:65025 id: 0
[20:56:16] [join] Vause has joined the server (0:127.0.0.1)
Alles anzeigen
Code
if (strcmp("/aduty", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdminLevel] > 0)
{
if(PlayerInfo[playerid][pADuty] == 0)
{
SendClientMessageToAll(COLOR_RED, "%s hat in den Adminmodus gewechselt.", PlayerInfo[playerid][pName]);
SetPlayerColor(playerid, COLOR_TAG_ADMIN);
PlayerInfo[playerid][pADuty] = 1;
return 1;
}
else if(PlayerInfo[playerid][pADuty] == 1)
{
SendClientMessageToAll(COLOR_RED, "%s hat den Adminmodus beendet.", PlayerInfo[playerid][pName]);
PlayerInfo[playerid][pADuty] = 0;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_ERROR, "* Du bist kein Admin!");
}
return 1;
}
Alles anzeigen