27.07.2010, 17:46
ok im not really a script noob but this damn little freeze/unfreeze command send me round the bend...
whats wrong with it??
Код:
if(strcmp(cmd, "/freeze", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "VERWENDE: /freeze [SpielerID/Name]"); return 1; } new playa; playa = ReturnUser(tmp); if(IsPlayerAdmin(playerid)) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { TogglePlayerControllable(playa, 0); } } else { SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command."); } } return 1; } //------ if(strcmp(cmd, "/unfreeze", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "VERWENDE: /unfreeze [SpielerID/Name]"); return 1; } new playa; playa = ReturnUser(tmp); if(IsPlayerAdmin(playerid)) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { TogglePlayerControllable(playa, 1); } } else { SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command."); } } return 1; }