Szerző Téma: OnPlayerSpawn dupla meghívás  (Megtekintve 669 alkalommal)

OnPlayerSpawn dupla meghívás
« Dátum: 2015. június 15. - 07:16:41 »
0 Show voters
Hi, ez a problémám
A OnPlayerSpawn kétszer hívódik meg, de egyszer hívom meg a SpawnPlayert .
 
LoginForm_Logged[playerid] = 1;
       
    mysql_format(kapcs, queryQ, 200, \"UPDATE character SET ply_Status=\'1\' WHERE ply_Order=\'%s\'\",
    _LoginForm_User[playerid]);
    mysql_tquery(kapcs, queryQ, \"CheckLogin\",\"is\",playerid,_LoginForm_User[playerid]);
/////////
fuggveny CheckLogin(playerid,s[])
{
if(IsLogged(playerid))
    {
    _LoginForm(playerid);
    CancelSelectTextDraw(playerid);
 
        new str2[128];
format(str2,sizeof(str2),\"SERVER: {ffffff}Welcome %s!\",PlayerID[ply_Name]);
msg(playerid,str2);
       SpawnPlayer(playerid);
    }
}
////////////////
public OnPlayerSpawn(playerid)
{
    if(IsLogged(playerid))
{
if(!IsRPName(PlayerID[ply_Name]))
{
    SendClientMessage(playerid,SERVER_COL,\"message...\");
   wait(100);
   Kick(playerid);
}
    TogglePlayerSpectating(playerid,0);
//
if(PlayerID[ply_First] == 0)
{
   SetPlayerPos(playerid,PlayerID[ply_LastPosX],PlayerID[ply_LastPosY],PlayerID[ply_LastPosZ]);
   SetPlayerFacingAngle(playerid,PlayerID[ply_LastPosA]);
   SetPlayerSkin(playerid,PlayerID[ply_Clothes]);
   SetPlayerHealth(playerid,PlayerID[ply_HitPoints]);
   SetPlayerArmour(playerid,PlayerID[ply_ArmorPoints]);
   SendClientMessage(playerid,-1,\"5\");
}
else
{
   if(!PlayerID[ply_Name])
      ShowPlayerDialog(playerid,DIA_NAME,DIALOG_STYLE_INPUT,\"Charactername\",\" \",\"Next\",\"\");
    PlayerID[ply_SpawnPosX] = 1480.9480;
    PlayerID[ply_SpawnPosY] = -1702.1752;
    PlayerID[ply_SpawnPosZ] = 14.0469;
    PlayerID[ply_SpawnPosA] = 179.0729;
    SetPlayerPos(playerid,1480.9480,-1702.1752,14.0469);
    SetPlayerFacingAngle(playerid,179.0729);
        PlayerID[ply_HitPoints] = 100.0;
        PlayerID[ply_ArmorPoints] = 1.0;
        PlayerID[ply_EnergyPoints] = 80.0;
        
        SetPlayerHealth(playerid,PlayerID[ply_HitPoints]);
   SetPlayerArmour(playerid,PlayerID[ply_ArmorPoints]);
        
        PlayerID[ply_First] = 0;
}
//
}
return 1;
}

 
Bármilyen lehetőséget meghallgatok, előre is köszönöm!
TogglePlayerSpectating(playerid,0); meghívja az SpawnPlayert
« Utoljára szerkesztve: 2015. június 15. - 09:02:13 írta Davidus »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal