Hallo com ich bin gerade am verweifeln ich habe ein tutorial erstellt erst ging es nicht dann ging es nur der erste teil und jetze wird es bis zum letzten teil durchgezogen ich werde aber nicht gespawn ?
die 5sec vergehen dann sollte ich spawnen passiert aber nicht es kommt unten diese 3 buttons nach links,nach rechts und spawnen aber sonst nichts und dann war mein leben auf 0 des bildschirm wurde schwarz und dann hatte ich das gleiche bild von der Bank wieder
enum playerInfo{
eingeloggt,
level,
db_id,
alevel,
slevel,
Skin,
fraktion,
rang,
leader,
coleader,
spawnchange,
tutpart
}
forward TutTimer(playerid);
if(dialogid==DIALOG_REGISTER)
{
if(response)
{
new name[MAX_PLAYER_NAME],query[128],passwort[35];
GetPlayerName(playerid,name,sizeof(name));
if(strlen(inputtext)>3)
{
//Registrierungsfunktion
mysql_escape_string(inputtext,passwort,dbhandle);
format(query,sizeof(query),"INSERT INTO user (username,password) VALUES ('%s','%s') ",name,passwort);
mysql_function_query(dbhandle,query,false,"OnPlayerRegister","d",playerid);
TogglePlayerControllable(playerid,0);
sInfo[playerid][tutpart] = 1;
SetTimerEx("TutTimer",2000,false,"i",playerid);
return 1;
}
else
{
//Kleiner als 4 Zeichen
SendClientMessage(playerid,ROT,"Dein Passwort muss mindestens 4 Zeichen lang sein.");
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrierung","Gib bitte dein gewünschtes Passwort an:","Okay","Abbrechen");
}
}
else
{
Kick(playerid);
}
return 1;
}
public TutTimer(playerid)
{
if(sInfo[playerid][tutpart] == 1)
{
SetPlayerPos(playerid,1494.8136,-1666.0505,14.0469);
SetPlayerFacingAngle(playerid,272.6125);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid,25);
InterpolateCameraPos(playerid, 1115.584228, -1728.955566, 35.356784, 1190.537475, -1698.813476, 38.931377, 10000,CAMERA_MOVE);
InterpolateCameraLookAt(playerid, 1120.251953, -1730.533691, 34.507175, 1191.590576, -1703.500488, 37.544792, 10000,CAMERA_MOVE);
sInfo[playerid][tutpart] = 2;
SetTimerEx("TutTimer",15000,false,"i",playerid);
return 1;
}
if(sInfo[playerid][tutpart] == 2)
{
SetPlayerPos(playerid,1176.4874,-1649.7354,14.0049);
SetPlayerFacingAngle(playerid,196.8897);
SetCameraBehindPlayer(playerid);
InterpolateCameraPos(playerid, -1991.850219, -67.903274, 55.942722, -2080.126220, -53.976066, 55.603290, 10000,CAMERA_MOVE);
InterpolateCameraLookAt(playerid, -1994.148071, -72.153877, 54.657318, -2077.844238, -58.186519, 54.166343, 10000,CAMERA_MOVE);
sInfo[playerid][tutpart] = 3;
SetTimerEx("TutTimer",15000,false,"i",playerid);
return 1;
}
if(sInfo[playerid][tutpart] == 3)
{
SetPlayerPos(playerid,1494.8136,-1666.0505,14.0469);
SetPlayerFacingAngle(playerid,272.6125);
SetCameraBehindPlayer(playerid);
InterpolateCameraPos(playerid, 1419.323608, -1036.734741, 34.718708, 1490.344116, -1047.630981, 35.451251, 10000,CAMERA_MOVE);
InterpolateCameraLookAt(playerid, 1423.311035, -1034.124511, 33.206516, 1487.870605, -1043.521362, 34.039466, 10000,CAMERA_MOVE);
sInfo[playerid][tutpart] = 4;
SetTimerEx("TutTimer",15000,false,"i",playerid);
return 1;
}
if(sInfo[playerid][tutpart] == 4)
{
SetPlayerVirtualWorld(playerid,0);
SpawnPlayer(playerid);
TogglePlayerControllable(playerid,1);
TogglePlayerSpectating(playerid, 0);
return 1;
}
return 1;
}
public OnPlayerRegister(playerid)
{
sInfo[playerid][db_id] = mysql_insert_id();
SendClientMessage(playerid, ROT, "=====> Willkommen auf PlayPoint Reallife <=====!");
SendClientMessage(playerid, GELB, "=====>Es folgt nun das Tutorial<=====");
SetPlayerMoney(playerid, 2500);
SetPlayerScore(playerid, 1);
SetTimerEx("SkinTimer", 200, 0, "dd", playerid, 26);
SetPlayerColor(playerid, 0xFF00FFFF);
savePlayer(playerid);
printf("%s hat sich Registriert!)",getPlayerName(playerid));
}