14.12.2014, 19:57
So..after I freeze someone on my server, and unfreeze him, it seems that the player can't get in car anymore or it makes him lag
Here is the command :
I don't really know what to do since there are no errors or nothing, everything seems to be fine, even tho I don't have a /unfreeze command, I use /freeze command to unfreeze them but I set time to 0.
Here is the command :
Код:
// Freeze a player (he cannot move anymore) COMMAND:freeze(playerid, params[]) { // Setup local variables new Msg[128], Name[24], AdminName[24], Reason[128], OtherPlayer, Duration; // Check if the player has logged in if (APlayerData[playerid][LoggedIn] == true) { // Check if the player's admin-level is at least 1 if (APlayerData[playerid][PlayerLevel] >= 1) { if (sscanf(params, "uis[128]", OtherPlayer, Duration, Reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/freeze <OtherPlayer> <Duration> <Reason>\""); else { // Check if the otherplayer is online if (IsPlayerConnected(OtherPlayer)) { // Get the player-names GetPlayerName(playerid, AdminName, sizeof(AdminName)); GetPlayerName(OtherPlayer, Name, sizeof(Name)); // Store the duration for the freeze, freeze him and start the frozentimer APlayerData[OtherPlayer][PlayerFrozen] = Duration; TogglePlayerControllable(OtherPlayer, 0); APlayerData[OtherPlayer][PlayerFrozenTimer] = SetTimerEx("Player_FreezeTimer", 1000, true, "i", OtherPlayer); // Let the other player know that he has been muted format(Msg, 128, "{FF0000}You have been frozen by {FFFF00}%s {FF0000}for {FFFF00}%s", AdminName, Reason); SendClientMessage(OtherPlayer, 0xFFFFFFFF, Msg); // Let the admin know who he has muted format(Msg, 128, "{00FF00}You have frozen {FFFF00}%s", Name); SendClientMessage(playerid, 0xFFFFFFFF, Msg); // Save the player-stats PlayerFile_Save(OtherPlayer); } else SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}That player isn't online"); } } else return 0; } else return 0; // Let the server know that this was a valid command return 1; }