Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Überprüfen ob jemand online kommt


  • Please log in to reply
No replies to this topic
Dudeee96
  • Members
  • 1 posts
  • Last active: Feb 27 2015 01:54 PM
  • Joined: 26 Feb 2015

Hallo,

ich möchte gerne ein Script haben, womit ich "überwachen" kann wenn Leute sich einloggen. Es geht um das Spiel SA-MP

 

Hier ist ein Code, der leider nicht funktioniert, was ich nicht verstehe :D

 

isPlayerOnline(Name)
{
 if(!GetPlayerIDByname(Gegner))
 {
 return 0
 }
 else
 {
 return 1
 }
}
   
Settimer, GegnerGehtOnlineCall, 100

 

GegnerGehtOnlineCall:
GegnerID = 0
Loop, Read, Gegner.txt   ; This loop retrieves each line from the file, one at a time.
{
    GegnerID ++ 1  ; Keep track of how many items are in the array.
    GegnerArray%GegnerID% := A_LoopReadLine  ;// Store this line in the next array element.
 Gegner := GegnerArray%GegnerID%
 oldGegnerOnline = isPlayerOnline(Gegner)) ;// fragt ab ob gegner online ist
 Sleep, 100
 newGegnerOnline = isPlayerOnline(Gegner)) ;// fragt ab ob gegner online ist
 if(oldGegnerOnline < newGegnerOnline) ;//
 {
 oldGegnerOnline = isPlayerOnline(Gegner))
 AddChatMessage("{FBFBFB}" Gegner " ist nun online.")
 }
}
return

 

Ich hoffe mir kann jemand helfen :)