SHOW:
|
|
- or go back to the newest paste.
| 1 | new Botnamen[ANZAHL DER BOTS][MAX_PLAYER_NAME] = { //ANPASSEN
| |
| 2 | "BOTNAME", | |
| 3 | "BOTNAME", | |
| 4 | "BOTNAME" | |
| 5 | }; | |
| 6 | ||
| 7 | //irgentwo im Script am besten ganz unten: | |
| 8 | ||
| 9 | stock IsBot(playerid, botid) | |
| 10 | {
| |
| 11 | if(!IsPlayerConnected(playerid)) return 0; | |
| 12 | if(!IsPlayerNPC(playerid)) return 0; | |
| 13 | new bname[MAX_PLAYER_NAME]; | |
| 14 | GetPlayerName(playerid, bname, MAX_PLAYER_NAME); | |
| 15 | if(strcmp(bname, Botnamen[botid], true)) return 0; | |
| 16 | return 1; | |
| 17 | } | |
| 18 | ||
| 19 | /* | |
| 20 | Nun kannst du die einfache Funktion: IsBot(playerid, botid) benutzen. | |
| 21 | Die Botid legst du oben bei den Namen fest, dort fügst du die Anzahl der Bots fest und schreibst | |
| 22 | untereinander wie oben vorgemacht die Namen hin. Der 1. Name ist id 0 die weiteren | |
| 23 | nach reihenfolge 1,2,3,.... | |
| 24 | ||
| 25 | Viel Spaß | |
| 26 | */ |