Wieso funtz mein "Spawn" nicht?
public OnPlayerSpawn(playerid)
{
switch(SpielerInfo[playerid][pFraktion])
{
case 0:{SetPlayerPos(playerid,mysql_GetFloat("fraktionen","SpawnX","Id","0"),mysql_GetFloat("fraktionen","SpawnY","Id","0"),mysql_GetFloat("fraktionen","SpawnZ","Id","0")); SetPlayerInterior(playerid,mysql_GetInt("fraktionen","Int","Id","0"));}
case 1:{SetPlayerPos(playerid,mysql_GetFloat("fraktionen","SpawnX","Id","1"),mysql_GetFloat("fraktionen","SpawnY","Id","1"),mysql_GetFloat("fraktionen","SpawnZ","Id","1")); SetPlayerInterior(playerid,mysql_GetInt("fraktionen","Int","Id","1"));}
case 2:{SetPlayerPos(playerid,mysql_GetFloat("fraktionen","SpawnX","Id","2"),mysql_GetFloat("fraktionen","SpawnY","Id","2"),mysql_GetFloat("fraktionen","SpawnZ","Id","2")); SetPlayerInterior(playerid,mysql_GetInt("fraktionen","Int","Id","2"));}
case 3:{SetPlayerPos(playerid,mysql_GetFloat("fraktionen","SpawnX","Id","3"),mysql_GetFloat("fraktionen","SpawnY","Id","3"),mysql_GetFloat("fraktionen","SpawnZ","Id","3")); SetPlayerInterior(playerid,mysql_GetInt("fraktionen","Int","Id","3"));}
case 4:{SetPlayerPos(playerid,mysql_GetFloat("fraktionen","SpawnX","Id","4"),mysql_GetFloat("fraktionen","SpawnY","Id","4"),mysql_GetFloat("fraktionen","SpawnZ","Id","4")); SetPlayerInterior(playerid,mysql_GetInt("fraktionen","Int","Id","4"));}
case 5:{SetPlayerPos(playerid,mysql_GetFloat("fraktionen","SpawnX","Id","5"),mysql_GetFloat("fraktionen","SpawnY","Id","5"),mysql_GetFloat("fraktionen","SpawnZ","Id","5")); SetPlayerInterior(playerid,mysql_GetInt("fraktionen","Int","Id","5"));}
}
return 1;
}
stock mysql_GetFloat(Table[], Field[], Where[], Is[])
{
new query[128], Float:sqlfloat;
mysql_real_escape_string(Table, Table);
mysql_real_escape_string(Field, Field);
mysql_real_escape_string(Where, Where);
mysql_real_escape_string(Is, Is);
format(query, 128, "SELECT %s FROM %s WHERE %s = '%s'", Field, Table, Where, Is);
mysql_query(query);
mysql_store_result();
mysql_fetch_float(sqlfloat);
mysql_free_result();
return _: sqlfloat;
}