Ich bin derzeit dran ein Gangwarscript zu Schreiben.
Ich hab jetzt ein Register/Login System mit mysql geschrieben.
Nach dem einloggen soll man einen skinauswählen können jedoch sobald man auf Login klickt
wählt er Automatisch den ersten skin aus.
public OnGameModeInit()
{
Connect_To_Database();
SetGameModeText("saWars");
//GSF
AddPlayerClass(105, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(106, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(107, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
//Yakuza
AddPlayerClass(123, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(122, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(186, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
//Ballas
AddPlayerClass(102, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(103, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(104, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
//Russen
AddPlayerClass(127, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(112, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(113, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0,1,2: gTeam[playerid] = TEAM_Gsf; // 0 - 2 Skin
case 3,4,5: gTeam[playerid] = TEAM_Yakuza; // 3-5
case 6,7,8: gTeam[playerid] = TEAM_Ballas; // 6 -8
case 9,10,11: gTeam[playerid] = TEAM_Russen; // 9 -11
}
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
if(GetPVarInt(playerid,"Eingeloggt") == 0)
{
if(mysql_CheckAccount(playerid) == 0)
SendClientMessage(playerid, 0xFFFFFFFF,"________-> Willkommen auf saWars <-________");
SendClientMessage(playerid, 0xFFFFFFFF,"Dein Account wurde nicht gefunden, bitte Registriere dich!");
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Bitte Gib ein Passwort an:","Register","Exit");
}
else if(mysql_CheckAccount(playerid) == 1)
{
SendClientMessage(playerid, 0xFFFFFFFF,"________-> Willkommen auf saWars <-________");
SendClientMessage(playerid, 0xFFFFFFFF,"Dein Account wurde gefunden, bitte Log dich nun ein!");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Bitte gib dein Passwort ein:","Login","Abbrechen");
}
}
return 1;
}