Hey zusammen,
habe da eben was zusammengescriptet, aber als ich auf den testserver die befehle "/afk" und "/tuning" ausprobieren wollte, geschah nichts, obwohl pawn keine errors etc. angezeigt hat.
Hier die Codes:
dcmd(afk,3,cmdtext);
dcmd(tuning,6,cmdtext);
// -------- tuning--------------------------------------------------------------
dcmd_tuning(playerid,params[]) {
#pragma unused params
ShowPlayerDialog(playerid,27,DIALOG_STYLE_LIST,"Tuning","Nitro\nHydraulik","Einbauen","Abbrechen");
return 1;
}
// -------- afk-----------------------------------------------------------------
dcmd_afk(playerid,params[]) {
#pragma unused params
ShowPlayerDialog(playerid,26,DIALOG_STYLE_MSGBOX,"AFK-Modus","Wenn du jetzt AFK gehst, klicke auf -AFK-\nWenn du wieder zurück bist, klicke auf -Wieder da-","AFK","Wieder da");
return 1;
}
#define afk 26
#define tuning 27
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
// A F K - M O D U S
if(dialogid == 26)
{
if(response == 0)
{
new name[MAX_PLAYER_NAME+1];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s ist wieder da!", name);
SendClientMessageToAll(COLOR_YELLOW, string);
TogglePlayerControllable(playerid,1);
return 1;
}
if(response == 1)
{
new name[MAX_PLAYER_NAME+1];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s ist AFK!", name);
SendClientMessageToAll(COLOR_YELLOW, string);
TogglePlayerControllable(playerid,0);
return 1;
}
}
// T U N I N G
if(dialogid == 27)
{
if(response)
{
if(listitem == 0)
{
if(IsPlayerInAnyVehicle(playerid)) {
new cartype = GetPlayerVehicleID(playerid);
GetVehicleModel(cartype);
{
AddVehicleComponent(cartype,1010);
SendClientMessage(playerid, COLOR_ORANGE,"Nitro hinzugefügt!");
}
}
else
{
SendClientMessage(playerid, COLOR_WARN,"Du bist in keinem Auto!");
}
return 1;
}
if(listitem == 1)
{
if(IsPlayerInAnyVehicle(playerid)) {
new cartype = GetPlayerVehicleID(playerid);
GetVehicleModel(cartype);
{
AddVehicleComponent(cartype,1087);
SendClientMessage(playerid, COLOR_ORANGE,"Hydraulik hinzugefügt!");
}
}
else
{
SendClientMessage(playerid, COLOR_WARN,"Du bist in keinem Auto!");
}
return 1;
}
}
}
return 0;
}
Hoffe ihr könnt helfen