| 42 |
|
} |
| 43 |
|
if(server_started) |
| 44 |
|
{ |
| 45 |
< |
sprintf_s(PlayerList[0]->Chr->Name,32, args[0].value_str32); |
| 45 |
> |
FLsUpdateName( 0, args[0].value_str32 ); |
| 46 |
|
} |
| 47 |
|
return 0; |
| 48 |
|
} |
| 128 |
|
|
| 129 |
|
uint16_t ONICALL kick(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
| 130 |
|
{ |
| 131 |
+ |
if(server_started && PlayerList[args[0].value_int32]) |
| 132 |
+ |
{ |
| 133 |
+ |
ONrCharacter_SetHitPoints(PlayerList[args[0].value_int32]->Chr, 0); |
| 134 |
|
FLrPlayerDisconnect(args[0].value_int32); |
| 135 |
|
FLsPublic_Event(EV_DISCONNECT, &args[0].value_int32); |
| 136 |
+ |
} |
| 137 |
|
return 0; |
| 138 |
|
} |
| 139 |
|
|
| 183 |
|
PlayerList[playerlist_slot] = Players+player_slot; |
| 184 |
|
PlayerList[playerlist_slot]->spawnnumber = player_slot; |
| 185 |
|
PlayerList[playerlist_slot]->Chr = &((Character *)(((GameState * )(ONgGameState))->CharacterStorage))[player_slot]; |
| 186 |
+ |
sprintf_s(PlayerList[playerlist_slot]->name, 32, "%s", PlayerList[playerlist_slot]->Chr->Name); |
| 187 |
|
// PlayerList[playerlist_slot]->Chr->Flags = chr_dontaim | chr_unkillable; //&= 0xFFBFFFFF; //WTF |
| 188 |
|
// if(!is_bot) PlayerList[playerlist_slot]->Chr->Flags &= 0xFFBFFFFF; //WTF |
| 189 |
|
// sprintf(PlayerList[playerlist_slot]->Chr->Name, "%.31s", name); |