Hey Leute ich habe mir ein kleines neon system erstellt
habe auch schon dini_IntSet usw gemacht aber das neon speichert nicht am auto´?
Mfg Game-Forum
Hey Leute ich habe mir ein kleines neon system erstellt
habe auch schon dini_IntSet usw gemacht aber das neon speichert nicht am auto´?
Mfg Game-Forum
Entschuldige bitte,
aber wir sind keine sogenannten "Hellseher"
und würden gerne helfen wenn du deinen bisherigen
Code für uns zur verfügung stellst.
MFG Arendium
Das habe ich bei den Dialogen
#define NEON 14
Das habe ich bei OnPlayerCommand Text
if (strcmp("/neon", cmdtext, true, 10) == 0)
{
if(isPlayerAnAdmin(playerid,3))
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
SendClientMessage(playerid, COLOR_WHITE, "Du bist nicht der Fahrer!");
return 1;
}
ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "Wähle eine Neon Farbe","Blau (500k)\nGrün(500k)\nGelb(500k)\nWeiß(500k)\nPink(500k)\nSirene(800k)\nNeon Abbauen(Gratis)","Benutzen","Schließen");
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist in keinem Vehicle!");
}
return 1;
}
Das habe ich bei OnDialogResponse
if(dialogid == NEON)
{
if(response)
{
if(listitem == 0)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "blue", CreateObject(18648,0,0,0,0,0,0));
SetPVarInt(playerid, "blue1", CreateObject(18648,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "blue"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "blue1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
if(GetPlayerMoney(playerid) < 500000)return SendClientMessage(playerid,0xAF0000FF,"Du hast nicht genug geld (500000$)");
GivePlayerMoney(playerid,-500000);
GameTextForPlayer(playerid, "~b~ Blau ~w~Du hast NEON zu deinem Vehicle hinzugefuegt",3500,5);
}
if(listitem == 1)
{
SetPVarInt(playerid, "neon", 2);
SetPVarInt(playerid, "green", CreateObject(18649,0,0,0,0,0,0));
SetPVarInt(playerid, "green1", CreateObject(18649,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "green"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "green1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
if(GetPlayerMoney(playerid) < 500000)return SendClientMessage(playerid,0xAF0000FF,"Du hast nicht genug geld (500000$)");
GivePlayerMoney(playerid,-500000);
GameTextForPlayer(playerid, "~g~Grün ~w~Du hast NEON zu deinem Vehicle hinzugefuegt",3500,5);
}
if(listitem == 2)
{
SetPVarInt(playerid, "neon", 3);
SetPVarInt(playerid, "yellow", CreateObject(18650,0,0,0,0,0,0));
SetPVarInt(playerid, "yellow1", CreateObject(18650,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "yellow"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "yellow1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
if(GetPlayerMoney(playerid) < 500000)return SendClientMessage(playerid,0xAF0000FF,"Du hast nicht genug geld (500000$)");
GivePlayerMoney(playerid,-500000);
GameTextForPlayer(playerid, "~y~Gelb~w~ Du hast NEON zu deinem Vehicle hinzugefuegt",3500,5);
}
if(listitem == 3)
{
SetPVarInt(playerid, "neon", 4);
SetPVarInt(playerid, "white", CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "white1", CreateObject(18652,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "white"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "white1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
if(GetPlayerMoney(playerid) < 500000)return SendClientMessage(playerid,0xAF0000FF,"Du hast nicht genug geld (500000$)");
GivePlayerMoney(playerid,-500000);
GameTextForPlayer(playerid, "~w~Weiß~w~ Du hast NEON zu deinem Vehicle hinzugefügt",3500,5);
}
if(listitem == 4)
{
SetPVarInt(playerid, "neon", 5);
SetPVarInt(playerid, "pink", CreateObject(18651,0,0,0,0,0,0));
SetPVarInt(playerid, "pink1", CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "pink"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "pink1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
if(GetPlayerMoney(playerid) < 500000)return SendClientMessage(playerid,0xAF0000FF,"Du hast nicht genug geld (500000$)");
GivePlayerMoney(playerid,-500000);
GameTextForPlayer(playerid, "~p~Pink~w~Du hast NEON zu deinem Vehicle hinzugefuegt",3500,5);
}
if(listitem == 5)
{
SetPVarInt(playerid, "Sirene", 1);
SetPVarInt(playerid, "Sirene", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "Sirene1", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "Sirene"), GetPlayerVehicleID(playerid), -0.609999, 0.154999, 0.864999, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "Sirene"), GetPlayerVehicleID(playerid), -0.609999, 0.154999, 0.864999, 0.0, 0.0, 0.0);
if(GetPlayerMoney(playerid) < 500000)return SendClientMessage(playerid,0xAF0000FF,"Du hast nicht genug geld (500000$)");
GivePlayerMoney(playerid,-800000);
GameTextForPlayer(playerid, "~p~Sirene~w~Du hast eine Sirene zu deinem Vehicle hinzugefuegt",3500,5);
}
if(listitem == 6)
{
DestroyObject(GetPVarInt(playerid, "blue"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "blue1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "green"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "green1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "yellow"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "yellow1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "white"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "white1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "pink"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "pink1"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "Sirene"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "Sirene1"));
DeletePVar(playerid, "neon");
GameTextForPlayer(playerid, "~g~Du hast das Neon Abgebaut",3500,5);
}
}
}
Wie kann ich das so machen das meine Sirene & Farben Gespeichert werden
Und das das immer untern dem auto bleibt?
z.B. so:
SpielerDatei
------------
Neon=
Blau=
Grün=
Gelb=
Pink=
Weiß=
Sirene=
Sirene1=
und wo wird dass dann gespeichert?
MySQL oder Ini ?
MySQL oder Ini ?
Ini
Hier ein Tutorial aus der englischen Szene.
Y_INI ist übrigens abgesehen von des vorgegebenen File-Systems die bester Alternative.
Schnell und Ressourcen sparend.